diff options
author | charnier <charnier@FreeBSD.org> | 1999-12-05 20:03:22 +0000 |
---|---|---|
committer | charnier <charnier@FreeBSD.org> | 1999-12-05 20:03:22 +0000 |
commit | f585d4fa84ca5e1ad268e6d90704357091bf7416 (patch) | |
tree | c99f666bbacc0df65011d6ec87e51e58a6b9b8df /usr.bin/cksum/cksum.c | |
parent | c32cda93bb0a38fcd29308dd4bfc8c21cc56270e (diff) | |
download | FreeBSD-src-f585d4fa84ca5e1ad268e6d90704357091bf7416.zip FreeBSD-src-f585d4fa84ca5e1ad268e6d90704357091bf7416.tar.gz |
Minimal use of .Ar and .Nm.
Add section number to .Xr reference.
Add DIAGNOSTICS section name.
Remove unused #includes.
Be consistant in the parsing of flags and add missing option in usage string.
Add rcsid.
Diffstat (limited to 'usr.bin/cksum/cksum.c')
-rw-r--r-- | usr.bin/cksum/cksum.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/usr.bin/cksum/cksum.c b/usr.bin/cksum/cksum.c index 01a7165..1411abe 100644 --- a/usr.bin/cksum/cksum.c +++ b/usr.bin/cksum/cksum.c @@ -48,14 +48,11 @@ static const char rcsid[] = "$FreeBSD$"; #endif /* not lint */ -#include <sys/cdefs.h> #include <sys/types.h> #include <err.h> -#include <errno.h> #include <fcntl.h> #include <stdio.h> -#include <stdlib.h> #include <string.h> #include <unistd.h> @@ -95,7 +92,7 @@ main(argc, argv) } else if (!strcmp(optarg, "2")) { cfncn = csum2; pfncn = psum2; - } else if (*optarg == '3') { + } else if (!strcmp(optarg, "3")) { cfncn = crc32; pfncn = pcrc; } else { @@ -136,7 +133,7 @@ main(argc, argv) static void usage() { - (void)fprintf(stderr, "usage: cksum [-o 1 | 2] [file ...]\n"); + (void)fprintf(stderr, "usage: cksum [-o 1 | 2 | 3] [file ...]\n"); (void)fprintf(stderr, " sum [file ...]\n"); exit(1); } |