diff --git a/usr.bin/what/what.c b/usr.bin/what/what.c index 5a9bf35018ec..8bb97e508344 100644 --- a/usr.bin/what/what.c +++ b/usr.bin/what/what.c @@ -54,6 +54,7 @@ static int sflag; static int found; void search __P((void)); +static void usage __P((void)); /* * what @@ -71,9 +72,7 @@ main(argc, argv) sflag = 1; break; default: - (void)fprintf(stderr, - "usage: what [-s] file ...\n"); - exit(1); + usage(); } argv += optind; @@ -90,6 +89,13 @@ main(argc, argv) exit(!found); } +static void +usage() +{ + (void)fprintf(stderr, "usage: what [-s] file ...\n"); + exit(1); +} + void search() {