Index: usr.bin/xstr/xstr.c =================================================================== --- usr.bin/xstr/xstr.c +++ usr.bin/xstr/xstr.c @@ -33,15 +33,11 @@ __FBSDID("$FreeBSD$"); -#ifndef lint static const char copyright[] = "@(#) Copyright (c) 1980, 1993\n\ The Regents of the University of California. All rights reserved.\n"; -#endif -#ifndef lint static const char sccsid[] = "@(#)xstr.c 8.1 (Berkeley) 6/9/93"; -#endif #include @@ -84,12 +80,12 @@ static off_t hashit(char *, int); static off_t yankstr(char **); -static void usage(void); +static void usage(void) __dead2; static void flushsh(void); static void found(int, off_t, char *); static void inithash(void); -static void onintr(int); +static void onintr(int) __dead2; static void process(const char *); static void prstr(char *); static void xsdotc(void); @@ -137,10 +133,10 @@ if (!readstd && freopen(argv[0], "r", stdin) == NULL) err(2, "%s", argv[0]); process("x.c"); - if (readstd == 0) - argc--, argv++; - else - readstd = 0; + if (readstd == 0) { + argc--; + argv++; + } } flushsh(); if (cflg == 0) @@ -223,8 +219,10 @@ } } out: - if (ferror(stdout)) - warn("x.c"), onintr(0); + if (ferror(stdout)) { + warn("x.c"); + onintr(0); + } } static off_t @@ -272,10 +270,10 @@ c -= '0'; if (!octdigit(*cp)) break; - c <<= 3, c += *cp++ - '0'; + c = c << 3 + *cp++ - '0'; if (!octdigit(*cp)) break; - c <<= 3, c += *cp++ - '0'; + c = c << 3 + *cp++ - '0'; break; } gotc: