diff options
author | Warner Losh <imp@FreeBSD.org> | 1999-04-25 21:13:34 +0000 |
---|---|---|
committer | Warner Losh <imp@FreeBSD.org> | 1999-04-25 21:13:34 +0000 |
commit | 426e9c1dcc6b3d9d4a5ad436aecaa1c2f9d29e17 (patch) | |
tree | c77cfa8ea1a0c7d542f16074d77f4bf229b98639 /bin/dd | |
parent | 51bb7ba6641b0601252c2c5a21eb47728a1c9566 (diff) | |
download | src-426e9c1dcc6b3d9d4a5ad436aecaa1c2f9d29e17.tar.gz src-426e9c1dcc6b3d9d4a5ad436aecaa1c2f9d29e17.zip |
First set of fixes to keep egcs happy. These include {} around single
statement if blocks[*] when the else could be ambiguous, not defaulting
to int type and removal of some unused variables.
[*] This is explicitly allowed by style(9) when the single statement
spans more than one line.
Reviewed by: obrien, chuckr
Notes
Notes:
svn path=/head/; revision=46073
Diffstat (limited to 'bin/dd')
-rw-r--r-- | bin/dd/dd.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/bin/dd/dd.c b/bin/dd/dd.c index 1e1c52f3320a..7aac8c62e34f 100644 --- a/bin/dd/dd.c +++ b/bin/dd/dd.c @@ -46,7 +46,7 @@ static char const copyright[] = static char sccsid[] = "@(#)dd.c 8.5 (Berkeley) 4/2/94"; #endif static const char rcsid[] = - "$Id: dd.c,v 1.14 1998/05/06 06:51:39 charnier Exp $"; + "$Id: dd.c,v 1.15 1998/05/13 07:33:47 charnier Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -178,8 +178,8 @@ setup() * table that does both at once. If just converting case, use the * built-in tables. */ - if (ddflags & (C_LCASE|C_UCASE)) - if (ddflags & C_ASCII) + if (ddflags & (C_LCASE|C_UCASE)) { + if (ddflags & C_ASCII) { if (ddflags & C_LCASE) { for (cnt = 0; cnt <= 0377; ++cnt) if (isupper(ctab[cnt])) @@ -189,7 +189,7 @@ setup() if (islower(ctab[cnt])) ctab[cnt] = toupper(ctab[cnt]); } - else if (ddflags & C_EBCDIC) + } else if (ddflags & C_EBCDIC) { if (ddflags & C_LCASE) { for (cnt = 0; cnt <= 0377; ++cnt) if (isupper(cnt)) @@ -199,7 +199,7 @@ setup() if (islower(cnt)) ctab[cnt] = ctab[toupper(cnt)]; } - else { + } else { ctab = ddflags & C_LCASE ? u2l : l2u; if (ddflags & C_LCASE) { for (cnt = 0; cnt <= 0377; ++cnt) @@ -215,6 +215,7 @@ setup() ctab[cnt] = cnt; } } + } (void)gettimeofday(&tv, (struct timezone *)NULL); st.start = tv.tv_sec + tv.tv_usec * 1e-6; } |