summaryrefslogtreecommitdiff
path: root/libbb/concat_path_file.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbb/concat_path_file.c')
-rw-r--r--libbb/concat_path_file.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libbb/concat_path_file.c b/libbb/concat_path_file.c
index 415b6a2fb..ef0d3282d 100644
--- a/libbb/concat_path_file.c
+++ b/libbb/concat_path_file.c
@@ -12,7 +12,6 @@
12 * not addition '/' if path name already have '/' 12 * not addition '/' if path name already have '/'
13*/ 13*/
14 14
15#include <string.h>
16#include "libbb.h" 15#include "libbb.h"
17 16
18char *concat_path_file(const char *path, const char *filename) 17char *concat_path_file(const char *path, const char *filename)
@@ -24,5 +23,5 @@ char *concat_path_file(const char *path, const char *filename)
24 lc = last_char_is(path, '/'); 23 lc = last_char_is(path, '/');
25 while (*filename == '/') 24 while (*filename == '/')
26 filename++; 25 filename++;
27 return bb_xasprintf("%s%s%s", path, (lc==NULL ? "/" : ""), filename); 26 return xasprintf("%s%s%s", path, (lc==NULL ? "/" : ""), filename);
28} 27}