diff options
author | Denis Vlasenko | 2007-09-28 22:35:29 +0000 |
---|---|---|
committer | Denis Vlasenko | 2007-09-28 22:35:29 +0000 |
commit | 3d2a9217a7d06d167d722cb4eabf7a29232d7bcd (patch) | |
tree | d5945c51fde3158c6f7e614393761355094c30e5 /networking | |
parent | ab8c9378c93168fcf3f3d7b87089cdc7884880cd (diff) | |
download | busybox-3d2a9217a7d06d167d722cb4eabf7a29232d7bcd.zip busybox-3d2a9217a7d06d167d722cb4eabf7a29232d7bcd.tar.gz |
httpd: trivial simplification
Diffstat (limited to 'networking')
-rw-r--r-- | networking/httpd.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/networking/httpd.c b/networking/httpd.c index 92a0710..c8fbefd 100644 --- a/networking/httpd.c +++ b/networking/httpd.c @@ -609,10 +609,12 @@ static void parse_conf(const char *path, int flag) if (*p == '/') { if (*cf == '/') { /* skip duplicate (or initial) slash */ continue; - } else if (*cf == '.') { + } + if (*cf == '.') { if (cf[1] == '/' || cf[1] == '\0') { /* remove extra '.' */ continue; - } else if ((cf[1] == '.') && (cf[2] == '/' || cf[2] == '\0')) { + } + if ((cf[1] == '.') && (cf[2] == '/' || cf[2] == '\0')) { ++cf; if (p > p0) { while (*--p != '/') /* omit previous dir */; @@ -627,8 +629,8 @@ static void parse_conf(const char *path, int flag) if ((p == p0) || (*p != '/')) { /* not a trailing slash */ ++p; /* so keep last character */ } - *p = '\0'; - sprintf(p0 + strlen(p0), ":%s", c); + *p = ':'; + strcpy(p + 1, c); } #endif |