/*
* Utility routines.
*
- * Copyright (C) many different people.
+ * Copyright (C) many different people.
* If you wrote this, please acknowledge your work.
*
* This program is free software; you can redistribute it and/or modify
extern char *concat_path_file(const char *path, const char *filename)
{
- char *outbuf;
char *lc;
if (!path)
- path="";
+ path = "";
lc = last_char_is(path, '/');
while (*filename == '/')
filename++;
- bb_xasprintf(&outbuf, "%s%s%s", path, (lc==NULL)? "/" : "", filename);
-
- return outbuf;
+ return bb_xasprintf("%s%s%s", path, (lc==NULL ? "/" : ""), filename);
}