From 110ab594ad9195e9cf56be31c3d43e102d051ebf Mon Sep 17 00:00:00 2001 From: Philippe Charnier Date: Sun, 26 Mar 2000 15:04:35 +0000 Subject: [PATCH] Add usage(). --- usr.bin/what/what.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) 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() {