aboutsummaryrefslogtreecommitdiff
path: root/libbb/simplify_path.c
diff options
context:
space:
mode:
authormjn3 <mjn3@69ca8d6d-28ef-0310-b511-8ec308f3f277>2003-03-19 09:13:01 +0000
committermjn3 <mjn3@69ca8d6d-28ef-0310-b511-8ec308f3f277>2003-03-19 09:13:01 +0000
commite901c15d890dbbdce4c086963cb1513653fc46b5 (patch)
treea318d0f03aa076c74b576ea45dc543a5669e8e91 /libbb/simplify_path.c
parent40758c00616c3b2c85d83eb4afdeb04b1f65c9f1 (diff)
downloadbusybox-w32-e901c15d890dbbdce4c086963cb1513653fc46b5.tar.gz
busybox-w32-e901c15d890dbbdce4c086963cb1513653fc46b5.tar.bz2
busybox-w32-e901c15d890dbbdce4c086963cb1513653fc46b5.zip
Major coreutils update.
git-svn-id: svn://busybox.net/trunk/busybox@6751 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'libbb/simplify_path.c')
-rw-r--r--libbb/simplify_path.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/libbb/simplify_path.c b/libbb/simplify_path.c
index 7b2a1ca51..743133cd1 100644
--- a/libbb/simplify_path.c
+++ b/libbb/simplify_path.c
@@ -1,8 +1,8 @@
1/* vi: set sw=4 ts=4: */ 1/* vi: set sw=4 ts=4: */
2/* 2/*
3 * simplify_path implementation for busybox 3 * bb_simplify_path implementation for busybox
4 * 4 *
5 * Copyright (C) 2001 Manuel Novoa III <mjn3@opensource.lineo.com> 5 * Copyright (C) 2001 Manuel Novoa III <mjn3@codepoet.org>
6 * 6 *
7 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by 8 * it under the terms of the GNU General Public License as published by
@@ -21,15 +21,14 @@
21 */ 21 */
22 22
23#include <stdlib.h> 23#include <stdlib.h>
24
25#include "libbb.h" 24#include "libbb.h"
26 25
27char *simplify_path(const char *path) 26char *bb_simplify_path(const char *path)
28{ 27{
29 char *s, *start, *p; 28 char *s, *start, *p;
30 29
31 if (path[0] == '/') 30 if (path[0] == '/')
32 start = xstrdup(path); 31 start = bb_xstrdup(path);
33 else { 32 else {
34 s = xgetcwd(NULL); 33 s = xgetcwd(NULL);
35 start = concat_path_file(s, path); 34 start = concat_path_file(s, path);