summaryrefslogtreecommitdiffstats
path: root/bin/dd
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1994-09-20 06:24:56 +0000
committerphk <phk@FreeBSD.org>1994-09-20 06:24:56 +0000
commit1da6fa08f8206df2750dd100912f64bc3b508afd (patch)
tree331c1fca4ef817a4bc201b59cd83d2157370968e /bin/dd
parent55c056a94255d28cb34253b2725c241315b9eed4 (diff)
downloadFreeBSD-src-1da6fa08f8206df2750dd100912f64bc3b508afd.zip
FreeBSD-src-1da6fa08f8206df2750dd100912f64bc3b508afd.tar.gz
Applied patch to make -Wall and -Dlint shut up.
Reviewed by: phk Submitted by: Josef Grosch <joeg@gagme.wwa.com>
Diffstat (limited to 'bin/dd')
-rw-r--r--bin/dd/args.c2
-rw-r--r--bin/dd/conv.c7
2 files changed, 5 insertions, 4 deletions
diff --git a/bin/dd/args.c b/bin/dd/args.c
index 3c2f3a2..0640972 100644
--- a/bin/dd/args.c
+++ b/bin/dd/args.c
@@ -98,7 +98,7 @@ jcl(argv)
in.dbsz = out.dbsz = 512;
- while (oper = *++argv) {
+ while ((oper = *++argv)) {/* JEAG */
if ((arg = strchr(oper, '=')) == NULL)
errx(1, "unknown operand %s", oper);
*arg++ = '\0';
diff --git a/bin/dd/conv.c b/bin/dd/conv.c
index 69fa8cf..02c2a64 100644
--- a/bin/dd/conv.c
+++ b/bin/dd/conv.c
@@ -59,7 +59,7 @@ def()
int cnt;
u_char *inp, *t;
- if (t = ctab)
+ if ((t = ctab))
for (inp = in.dbp - (cnt = in.dbrcnt); cnt--; ++inp)
*inp = t[*inp];
@@ -103,6 +103,7 @@ block()
int ch, cnt, maxlen;
u_char *inp, *outp, *t;
+ ch = 0;
/*
* Record truncation can cross block boundaries. If currently in a
* truncation state, keep tossing characters until reach a newline.
@@ -129,7 +130,7 @@ block()
*/
for (inp = in.dbp - in.dbcnt, outp = out.dbp; in.dbcnt;) {
maxlen = MIN(cbsz, in.dbcnt);
- if (t = ctab)
+ if ((t = ctab))
for (cnt = 0;
cnt < maxlen && (ch = *inp++) != '\n'; ++cnt)
*outp++ = t[ch];
@@ -213,7 +214,7 @@ unblock()
u_char *inp, *t;
/* Translation and case conversion. */
- if (t = ctab)
+ if ((t = ctab))
for (cnt = in.dbrcnt, inp = in.dbp; cnt--;)
*--inp = t[*inp];
/*
OpenPOWER on IntegriCloud