diff options
author | alex <alex@FreeBSD.org> | 1997-12-29 00:09:06 +0000 |
---|---|---|
committer | alex <alex@FreeBSD.org> | 1997-12-29 00:09:06 +0000 |
commit | 005e82d0d48c18bf9c8f7dd68fbdddaecd02fa38 (patch) | |
tree | d6173536ac119a8f4ca284ec466429ed22238d6c /usr.bin/cksum | |
parent | 2d2c1486baa4d002f1ec27ce2fdbf344aa08d814 (diff) | |
download | FreeBSD-src-005e82d0d48c18bf9c8f7dd68fbdddaecd02fa38.zip FreeBSD-src-005e82d0d48c18bf9c8f7dd68fbdddaecd02fa38.tar.gz |
-Wall cleanup.
Diffstat (limited to 'usr.bin/cksum')
-rw-r--r-- | usr.bin/cksum/crc32.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/cksum/crc32.c b/usr.bin/cksum/crc32.c index ffeacc1..51aff76 100644 --- a/usr.bin/cksum/crc32.c +++ b/usr.bin/cksum/crc32.c @@ -86,9 +86,11 @@ unsigned long crctab[256] = { #include <stdio.h> #include <sys/types.h> +#include <unistd.h> u_long crc32_total = 0 ; +int crc32(fd, cval, clen) register int fd; u_long *cval, *clen; @@ -96,11 +98,10 @@ crc32(fd, cval, clen) u_long crc = ~0; char buf[BUFSIZ], *p ; int len, nr ; - FILE *in; len = 0 ; crc32_total = ~crc32_total ; - while (nr = read(fd, buf, sizeof(buf))) + while ((nr = read(fd, buf, sizeof(buf)))) for (len += nr, p = buf; nr--; ++p) { CRC(crc, *p) ; CRC(crc32_total, *p) ; |