summaryrefslogtreecommitdiffstats
path: root/bin/dd
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>1999-04-25 21:13:34 +0000
committerimp <imp@FreeBSD.org>1999-04-25 21:13:34 +0000
commit321c551969cc862a859c9e79c8404af90c94e81d (patch)
tree5ede02d61e978d083db7e7833d1560584b758dc1 /bin/dd
parent4be4456eab17cc243bba5d62ce59ba675507482b (diff)
downloadFreeBSD-src-321c551969cc862a859c9e79c8404af90c94e81d.zip
FreeBSD-src-321c551969cc862a859c9e79c8404af90c94e81d.tar.gz
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
Diffstat (limited to 'bin/dd')
-rw-r--r--bin/dd/dd.c11
1 files changed, 6 insertions, 5 deletions
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 <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;
}
OpenPOWER on IntegriCloud