diff options
author | markm <markm@FreeBSD.org> | 2003-02-27 18:04:54 +0000 |
---|---|---|
committer | markm <markm@FreeBSD.org> | 2003-02-27 18:04:54 +0000 |
commit | 5736aa9039e290655a2484d65e3da9ab4033863d (patch) | |
tree | d203dbd769dc431349601f5d03ed08b57352472d /bin/dd/conv.c | |
parent | 5c7b43870b95aef3fdb86f420e387bc30f7fb1d5 (diff) | |
download | FreeBSD-src-5736aa9039e290655a2484d65e3da9ab4033863d.zip FreeBSD-src-5736aa9039e290655a2484d65e3da9ab4033863d.tar.gz |
WARNS=4 fixes. This would be WARNS=9 if we were -std=99 instead of
-ansi, due to 'long long'.
Reviewed by: green (slightly earlier version)
Diffstat (limited to 'bin/dd/conv.c')
-rw-r--r-- | bin/dd/conv.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/bin/dd/conv.c b/bin/dd/conv.c index 734513a..a31e520 100644 --- a/bin/dd/conv.c +++ b/bin/dd/conv.c @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include <sys/param.h> #include <err.h> +#include <inttypes.h> #include <string.h> #include "dd.h" @@ -171,7 +172,8 @@ block(void) ++st.trunc; /* Toss characters to a newline. */ - for (; in.dbcnt && *inp++ != '\n'; --in.dbcnt); + for (; in.dbcnt && *inp++ != '\n'; --in.dbcnt) + ; if (!in.dbcnt) intrunc = 1; else @@ -223,8 +225,8 @@ unblock(void) /* Translation and case conversion. */ if ((t = ctab) != NULL) - for (cnt = in.dbrcnt, inp = in.dbp; cnt--;) - *--inp = t[*inp]; + for (inp = in.dbp - (cnt = in.dbrcnt); cnt--; ++inp) + *inp = t[*inp]; /* * Copy records (max cbsz size chunks) into the output buffer. The * translation has to already be done or we might not recognize the |