From 321c551969cc862a859c9e79c8404af90c94e81d Mon Sep 17 00:00:00 2001 From: imp Date: Sun, 25 Apr 1999 21:13:34 +0000 Subject: 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 --- bin/dd/dd.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'bin/dd') diff --git a/bin/dd/dd.c b/bin/dd/dd.c index 1e1c52f..7aac8c6 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 @@ -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; } -- cgit v1.1