diff options
author | jb <jb@FreeBSD.org> | 1998-03-10 05:03:49 +0000 |
---|---|---|
committer | jb <jb@FreeBSD.org> | 1998-03-10 05:03:49 +0000 |
commit | 3993727e630e0d7a6b7efef91fa8eb08cf4b62bf (patch) | |
tree | 5a3faab89b17f643a7a86dfb08ce976dd9534067 /usr.bin/cksum/print.c | |
parent | 757dddeeb5cd4b11dbbab454753dcdef1458bb26 (diff) | |
download | FreeBSD-src-3993727e630e0d7a6b7efef91fa8eb08cf4b62bf.zip FreeBSD-src-3993727e630e0d7a6b7efef91fa8eb08cf4b62bf.tar.gz |
cksum does a 32-bit checksum, so it needs to use u_int32_t variables,
not u_long. With this change, cksum stops core dumping on alpha (not
a good sign!) and actually computes the same values as it does on i386.
Diffstat (limited to 'usr.bin/cksum/print.c')
-rw-r--r-- | usr.bin/cksum/print.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.bin/cksum/print.c b/usr.bin/cksum/print.c index d0ffeb3..48c38aa 100644 --- a/usr.bin/cksum/print.c +++ b/usr.bin/cksum/print.c @@ -42,9 +42,9 @@ static char sccsid[] = "@(#)print.c 8.1 (Berkeley) 6/6/93"; void pcrc(fn, val, len) char *fn; - u_long val, len; + u_int32_t val, len; { - (void)printf("%lu %lu", val, len); + (void)printf("%lu %lu", (u_long) val, (u_long) len); if (fn) (void)printf(" %s", fn); (void)printf("\n"); @@ -53,9 +53,9 @@ pcrc(fn, val, len) void psum1(fn, val, len) char *fn; - u_long val, len; + u_int32_t val, len; { - (void)printf("%lu %lu", val, (len + 1023) / 1024); + (void)printf("%lu %lu", (u_long) val, (u_long) (len + 1023) / 1024); if (fn) (void)printf(" %s", fn); (void)printf("\n"); @@ -64,9 +64,9 @@ psum1(fn, val, len) void psum2(fn, val, len) char *fn; - u_long val, len; + u_int32_t val, len; { - (void)printf("%lu %lu", val, (len + 511) / 512); + (void)printf("%lu %lu", (u_long) val, (u_long) (len + 511) / 512); if (fn) (void)printf(" %s", fn); (void)printf("\n"); |