diff options
author | Jim Meyering <jim@meyering.net> | 1994-12-03 20:29:28 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1994-12-03 20:29:28 +0000 |
commit | 9f715b2bdb8fa3b4803af025c1a709403ed7fd7d (patch) | |
tree | 8db7484b97fc7a0b2ec26461d441b47eac07d1f5 | |
parent | 103e83b65eac3bdc239160c33c3ced8fc2006e83 (diff) | |
download | coreutils-9f715b2bdb8fa3b4803af025c1a709403ed7fd7d.tar.xz |
(du_files): Variable name changes.
-rw-r--r-- | src/du.c | 32 |
1 files changed, 16 insertions, 16 deletions
@@ -313,30 +313,30 @@ du_files (files) char **files; { #ifdef HAVE_FCHDIR - int wd_desc; + int starting_desc; #endif - char *wd = NULL; + char *starting_dir = NULL; ino_t initial_ino; /* Initial directory's inode. */ dev_t initial_dev; /* Initial directory's device. */ int i; /* Index in FILES. */ #ifdef HAVE_FCHDIR - wd_desc = open (".", O_RDONLY); - if (wd_desc < 0) + starting_desc = open (".", O_RDONLY); + if (starting_desc < 0) error (1, errno, "cannot open current directory"); /* On SunOS, fchdir returns EINVAL if accounting is enabled, so we have to fall back to chdir. */ - if (fchdir (wd_desc) && errno == EINVAL) + if (fchdir (starting_desc) && errno == EINVAL) { - close (wd_desc); - wd_desc = -1; + close (starting_desc); + starting_desc = -1; } - if (wd_desc == -1) + if (starting_desc == -1) #endif { - wd = xgetcwd (); - if (wd == NULL) + starting_dir = xgetcwd (); + if (starting_dir == NULL) error (1, errno, "cannot get current directory"); } @@ -378,15 +378,15 @@ du_files (files) if (stat_buf.st_ino != initial_ino || stat_buf.st_dev != initial_dev) { #ifdef HAVE_FCHDIR - if (wd_desc >= 0) + if (starting_desc >= 0) { - if (fchdir (wd_desc) < 0) + if (fchdir (starting_desc) < 0) error (1, errno, "cannot return to starting directory"); } else #endif - if (chdir (wd) < 0) - error (1, errno, "%s", wd); + if (chdir (starting_dir) < 0) + error (1, errno, "%s", starting_dir); } } @@ -397,8 +397,8 @@ du_files (files) fflush (stdout); } - if (wd != NULL) - free (wd); + if (starting_dir != NULL) + free (starting_dir); } /* Print (if appropriate) and return the size |