X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;f=libbb%2Fconcat_path_file.c;h=f0cb552d9ff4709cb173680fbf70a2c6f6f53671;hb=4ea955bc7e5575bc1d8b34c364591c47653f2cfd;hp=e62b99ef689a39a9bea136dfc7589e25097d8953;hpb=a79c1af5c0d3908a3ad30806530c754b42cf80e2;p=project%2Fopkg-lede.git diff --git a/libbb/concat_path_file.c b/libbb/concat_path_file.c index e62b99e..f0cb552 100644 --- a/libbb/concat_path_file.c +++ b/libbb/concat_path_file.c @@ -34,12 +34,12 @@ extern char *concat_path_file(const char *path, const char *filename) char *lc; if (!path) - path=""; + path = ""; lc = last_char_is(path, '/'); while (*filename == '/') filename++; - outbuf = xmalloc(strlen(path)+strlen(filename)+1+(lc==NULL)); - sprintf(outbuf, "%s%s%s", path, (lc==NULL)? "/" : "", filename); + outbuf = xmalloc(strlen(path) + strlen(filename) + 1 + (lc == NULL)); + sprintf(outbuf, "%s%s%s", path, (lc == NULL) ? "/" : "", filename); return outbuf; }