X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=libbb%2Fconcat_path_file.c;h=9aae601a4cca7ad100a561e78e383c93c0b1f079;hb=666da5e2c6edec979966d16771818b32dcfafe04;hp=415b6a2fb48d42d2b35b3e6dfc0b7d3234caccb4;hpb=5d8843e451c01d8abfe6b5be772637310e9e581e;p=oweals%2Fbusybox.git diff --git a/libbb/concat_path_file.c b/libbb/concat_path_file.c index 415b6a2fb..9aae601a4 100644 --- a/libbb/concat_path_file.c +++ b/libbb/concat_path_file.c @@ -9,10 +9,9 @@ */ /* concatenate path and file name to new allocation buffer, - * not addition '/' if path name already have '/' + * not adding '/' if path name already has '/' */ -#include #include "libbb.h" char *concat_path_file(const char *path, const char *filename) @@ -24,5 +23,5 @@ char *concat_path_file(const char *path, const char *filename) lc = last_char_is(path, '/'); while (*filename == '/') filename++; - return bb_xasprintf("%s%s%s", path, (lc==NULL ? "/" : ""), filename); + return xasprintf("%s%s%s", path, (lc==NULL ? "/" : ""), filename); }