summaryrefslogtreecommitdiff
path: root/src/du.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1994-12-03 20:29:28 +0000
committerJim Meyering <jim@meyering.net>1994-12-03 20:29:28 +0000
commit9f715b2bdb8fa3b4803af025c1a709403ed7fd7d (patch)
tree8db7484b97fc7a0b2ec26461d441b47eac07d1f5 /src/du.c
parent103e83b65eac3bdc239160c33c3ced8fc2006e83 (diff)
downloadcoreutils-9f715b2bdb8fa3b4803af025c1a709403ed7fd7d.tar.xz
(du_files): Variable name changes.
Diffstat (limited to 'src/du.c')
-rw-r--r--src/du.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/du.c b/src/du.c
index f5453afba..3cbaeb092 100644
--- a/src/du.c
+++ b/src/du.c
@@ -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