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/cksum.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/cksum.c')
-rw-r--r-- | usr.bin/cksum/cksum.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/cksum/cksum.c b/usr.bin/cksum/cksum.c index 1a4d207..dbe488c 100644 --- a/usr.bin/cksum/cksum.c +++ b/usr.bin/cksum/cksum.c @@ -45,7 +45,7 @@ static const char copyright[] = static char sccsid[] = "@(#)cksum.c 8.2 (Berkeley) 4/28/95"; #endif static const char rcsid[] = - "$Id: cksum.c,v 1.7 1997/11/09 05:35:26 obrien Exp $"; + "$Id: cksum.c,v 1.8 1997/11/09 05:47:55 obrien Exp $"; #endif /* not lint */ #include <sys/cdefs.h> @@ -69,10 +69,10 @@ main(argc, argv) char **argv; { register int ch, fd, rval; - u_long len, val; + u_int32_t len, val; char *fn, *p; - int (*cfncn) __P((int, unsigned long *, unsigned long *)); - void (*pfncn) __P((char *, unsigned long, unsigned long)); + int (*cfncn) __P((int, u_int32_t *, u_int32_t *)); + void (*pfncn) __P((char *, u_int32_t, u_int32_t)); if ((p = rindex(argv[0], '/')) == NULL) p = argv[0]; |