summaryrefslogtreecommitdiff
path: root/coreutils/dd.c
diff options
context:
space:
mode:
authorEric Andersen2001-03-21 07:34:27 +0000
committerEric Andersen2001-03-21 07:34:27 +0000
commit1ca20a77476fb69e2472080ef6ba23c8c0ad12ad (patch)
treed1f07be4de0004fe5e30b44320e10285147e7944 /coreutils/dd.c
parent7447642a47c6a0aefd05f4acf730950a510634cd (diff)
downloadbusybox-1ca20a77476fb69e2472080ef6ba23c8c0ad12ad.zip
busybox-1ca20a77476fb69e2472080ef6ba23c8c0ad12ad.tar.gz
A nice patch from Larry Doolittle that adds -Wshadow and
cleans up most of the now-revealed problems.
Diffstat (limited to 'coreutils/dd.c')
-rw-r--r--coreutils/dd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/coreutils/dd.c b/coreutils/dd.c
index 1618dd1..3f58929 100644
--- a/coreutils/dd.c
+++ b/coreutils/dd.c
@@ -45,7 +45,7 @@ static const struct suffix_mult dd_suffixes[] = {
int dd_main(int argc, char **argv)
{
- int i, ifd, ofd, oflag, sync = FALSE, trunc = TRUE;
+ int i, ifd, ofd, oflag, sync_flag = FALSE, trunc = TRUE;
size_t in_full = 0, in_part = 0, out_full = 0, out_part = 0;
size_t bs = 512, count = -1;
ssize_t n;
@@ -73,7 +73,7 @@ int dd_main(int argc, char **argv)
trunc = FALSE;
buf += 7;
} else if (strncmp("sync", buf, 4) == 0) {
- sync = TRUE;
+ sync_flag = TRUE;
buf += 4;
} else {
error_msg_and_die("invalid conversion `%s'", argv[i]+5);
@@ -138,7 +138,7 @@ int dd_main(int argc, char **argv)
in_full++;
else
in_part++;
- if (sync) {
+ if (sync_flag) {
memset(buf + n, '\0', bs - n);
n = bs;
}