summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2020-08-13 14:13:32 +0100
committerRon Yorston <rmy@pobox.com>2020-08-13 14:58:01 +0100
commit16e5930a65f3c7c570b8a0dda8daa19ab4792fa2 (patch)
treef44564e26007a5cb81269f7fe0e34ad12398030e
parent6059723900f2af1fbd394c457d1feae342e344f6 (diff)
downloadbusybox-w32-16e5930a65f3c7c570b8a0dda8daa19ab4792fa2.tar.gz
busybox-w32-16e5930a65f3c7c570b8a0dda8daa19ab4792fa2.tar.bz2
busybox-w32-16e5930a65f3c7c570b8a0dda8daa19ab4792fa2.zip
httpd: code shrink
Use the new need_system_drive() function in httpd. Saves 16 bytes.
-rw-r--r--networking/httpd.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/networking/httpd.c b/networking/httpd.c
index cfb635df3..5d2d2681c 100644
--- a/networking/httpd.c
+++ b/networking/httpd.c
@@ -665,10 +665,9 @@ static void parse_conf(const char *path, int flag)
665 filename = alloca(strlen(path) + sizeof(HTTPD_CONF) + 2); 665 filename = alloca(strlen(path) + sizeof(HTTPD_CONF) + 2);
666 sprintf((char *)filename, "%s/%s", path, HTTPD_CONF); 666 sprintf((char *)filename, "%s/%s", path, HTTPD_CONF);
667#else 667#else
668 const char *sd = get_system_drive(); 668 const char *sd = need_system_drive(path);
669 669
670 filename = auto_string(xasprintf("%s%s/%s", 670 filename = auto_string(xasprintf("%s%s/%s", sd ? sd : "",
671 (sd && path[0] == '/' && root_len(path) == 0) ? sd : "",
672 path, HTTPD_CONF)); 671 path, HTTPD_CONF));
673#endif 672#endif
674 } 673 }