aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/cksum/cksum.c
diff options
context:
space:
mode:
authorDavid E. O'Brien <obrien@FreeBSD.org>1997-11-09 05:35:26 +0000
committerDavid E. O'Brien <obrien@FreeBSD.org>1997-11-09 05:35:26 +0000
commitd40fea8c06f4bfa04c46514a4f07c43d6b7a9d1d (patch)
tree7e744b7965ae4205d0a8f27bd890ca4db32e658f /usr.bin/cksum/cksum.c
parent64bd2f7b573544f1519ca7b3f45d67108f216bea (diff)
downloadsrc-d40fea8c06f4bfa04c46514a4f07c43d6b7a9d1d.tar.gz
src-d40fea8c06f4bfa04c46514a4f07c43d6b7a9d1d.zip
Notes
Diffstat (limited to 'usr.bin/cksum/cksum.c')
-rw-r--r--usr.bin/cksum/cksum.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/usr.bin/cksum/cksum.c b/usr.bin/cksum/cksum.c
index 7a0e4b89d8c7..4c654cbda3de 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.5 1997/07/06 03:18:13 bde Exp $";
+ "$Id: cksum.c,v 1.6 1997/09/26 08:02:17 phk Exp $";
#endif /* not lint */
#include <sys/cdefs.h>
@@ -84,31 +84,31 @@ main(argc, argv)
} else {
cfncn = crc;
pfncn = pcrc;
- }
- while ((ch = getopt(argc, argv, "o:")) != -1)
- switch (ch) {
- case 'o':
- if (!strcmp(optarg, "1")) {
- cfncn = csum1;
- pfncn = psum1;
- } else if (!strcmp(optarg, "2")) {
- cfncn = csum2;
- pfncn = psum2;
- } else if (*optarg == '3') {
- cfncn = crc32;
- pfncn = pcrc;
- } else {
- warnx("illegal argument to -o option");
+ while ((ch = getopt(argc, argv, "o:")) != -1)
+ switch (ch) {
+ case 'o':
+ if (!strcmp(optarg, "1")) {
+ cfncn = csum1;
+ pfncn = psum1;
+ } else if (!strcmp(optarg, "2")) {
+ cfncn = csum2;
+ pfncn = psum2;
+ } else if (*optarg == '3') {
+ cfncn = crc32;
+ pfncn = pcrc;
+ } else {
+ warnx("illegal argument to -o option");
+ usage();
+ }
+ break;
+ case '?':
+ default:
usage();
}
- break;
- case '?':
- default:
- usage();
- }
- argc -= optind;
- argv += optind;
+ argc -= optind;
+ argv += optind;
+ }
fd = STDIN_FILENO;
fn = NULL;