diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2015-09-07 00:49:21 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2015-09-07 00:49:21 +0000 |
commit | 5da001730b560f1bb7165bf27a0c72d25452c2a5 (patch) | |
tree | 3cb92f37234a54ff720e389bdf1ebded17e24c48 /games/primes/primes.c | |
parent | 60ea11b5d7465d615e76fa72191b4d4e377c18e9 (diff) |
cosmetic fixes
Diffstat (limited to 'games/primes/primes.c')
-rw-r--r-- | games/primes/primes.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/games/primes/primes.c b/games/primes/primes.c index 0a54011ab07..f5e9478ae6d 100644 --- a/games/primes/primes.c +++ b/games/primes/primes.c @@ -1,4 +1,4 @@ -/* $OpenBSD: primes.c,v 1.15 2009/10/27 23:59:26 deraadt Exp $ */ +/* $OpenBSD: primes.c,v 1.16 2015/09/07 00:49:20 tedu Exp $ */ /* $NetBSD: primes.c,v 1.5 1995/04/24 12:24:47 cgd Exp $ */ /* @@ -103,12 +103,13 @@ main(int argc, char *argv[]) int ch; char *p; - while ((ch = getopt(argc, argv, "")) != -1) + while ((ch = getopt(argc, argv, "")) != -1) { switch (ch) { case '?': default: usage(); } + } argc -= optind; argv += optind; @@ -183,7 +184,8 @@ read_num_buf(void) exit(0); } buf[strcspn(buf, "\n")] = '\0'; - for (p = buf; isblank(*p); ++p); + for (p = buf; isblank(*p); ++p) + ; if (*p == '\0') continue; if (*p == '-') @@ -192,7 +194,8 @@ read_num_buf(void) val = strtoul(buf, &p, 10); if (errno) err(1, "%s", buf); - for (; isblank(*p); ++p); + for (; isblank(*p); ++p) + ; if (*p != '\0') errx(1, "%s: illegal numeric format.", buf); return (val); |