summaryrefslogtreecommitdiff
path: root/libbb/simplify_path.c
diff options
context:
space:
mode:
authorManuel Novoa III <mjn3@codepoet.org>2003-03-19 09:13:01 +0000
committerManuel Novoa III <mjn3@codepoet.org>2003-03-19 09:13:01 +0000
commitcad5364599eb5062d59e0c397ed638ddd61a8d5d (patch)
treea318d0f03aa076c74b576ea45dc543a5669e8e91 /libbb/simplify_path.c
parente01f9662a5bd5d91be4f6b3941b57fff73cd5af1 (diff)
downloadbusybox-w32-cad5364599eb5062d59e0c397ed638ddd61a8d5d.tar.gz
busybox-w32-cad5364599eb5062d59e0c397ed638ddd61a8d5d.tar.bz2
busybox-w32-cad5364599eb5062d59e0c397ed638ddd61a8d5d.zip
Major coreutils update.
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);