Changeset 1770 in MondoRescue for branches/stable/mindi-busybox/libbb/concat_path_file.c
- Timestamp:
- Nov 6, 2007, 11:01:53 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/mindi-busybox/libbb/concat_path_file.c
r821 r1770 6 6 * If you wrote this, please acknowledge your work. 7 7 * 8 * This program is free software; you can redistribute it and/or modify 9 * it under the terms of the GNU General Public License as published by 10 * the Free Software Foundation; either version 2 of the License, or 11 * (at your option) any later version. 12 * 13 * This program is distributed in the hope that it will be useful, but 14 * WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 * General Public License for more details. 17 * 18 * You should have received a copy of the GNU General Public License 19 * along with this program; if not, write to the Free Software 20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 21 * USA 8 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. 22 9 */ 23 10 24 11 /* concatenate path and file name to new allocation buffer, 25 * not addi tion '/' if path name already have'/'12 * not adding '/' if path name already has '/' 26 13 */ 27 14 28 #include <string.h>29 15 #include "libbb.h" 30 16 … … 38 24 while (*filename == '/') 39 25 filename++; 40 return bb_xasprintf("%s%s%s", path, (lc==NULL ? "/" : ""), filename);26 return xasprintf("%s%s%s", path, (lc==NULL ? "/" : ""), filename); 41 27 }
Note:
See TracChangeset
for help on using the changeset viewer.