summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2001-05-12 10:03:07 +0000
committerJim Meyering <jim@meyering.net>2001-05-12 10:03:07 +0000
commitb4c2f799eccfd5a71e88ca42527cffecb871a91a (patch)
treebaf05b027e660471ec5af5b719ed2c913a90cbe3 /src
parent98e643ab3b37aa69e70afa17c90a0269735a71a6 (diff)
downloadcoreutils-b4c2f799eccfd5a71e88ca42527cffecb871a91a.tar.xz
(strip_trailing_slashes): Likewise.
(find_mount_point): No need to strip trailing slashes before invoking new dir_name.
Diffstat (limited to 'src')
-rw-r--r--src/df.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/df.c b/src/df.c
index ad49e4244..bd361b17b 100644
--- a/src/df.c
+++ b/src/df.c
@@ -48,7 +48,6 @@
#define AUTHORS \
"Torbjorn Granlund, David MacKenzie, Larry McVoy, and Paul Eggert"
-void strip_trailing_slashes ();
char *xgetcwd ();
/* Name this program was run with. */
@@ -454,14 +453,8 @@ find_mount_point (const char *file, const struct stat *file_stat)
else
/* FILE is some other kind of file, we need to use its directory. */
{
- int rv;
- char *tmp = xstrdup (file);
- char *dir;
-
- strip_trailing_slashes (tmp);
- dir = dir_name (tmp);
- free (tmp);
- rv = chdir (dir);
+ char *dir = dir_name (file);
+ int rv = chdir (dir);
free (dir);
if (rv < 0)