summaryrefslogtreecommitdiffstats
path: root/usr.bin/what
diff options
context:
space:
mode:
authorcharnier <charnier@FreeBSD.org>2000-03-26 15:04:35 +0000
committercharnier <charnier@FreeBSD.org>2000-03-26 15:04:35 +0000
commita6390ef21185bd4e1250418041ee812a84905594 (patch)
tree6fc68307526a1eb54a802d545b674f85e8bd3a82 /usr.bin/what
parent4928e25e188d4fd075e68a9e2e02a9a891834842 (diff)
downloadFreeBSD-src-a6390ef21185bd4e1250418041ee812a84905594.zip
FreeBSD-src-a6390ef21185bd4e1250418041ee812a84905594.tar.gz
Add usage().
Diffstat (limited to 'usr.bin/what')
-rw-r--r--usr.bin/what/what.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/usr.bin/what/what.c b/usr.bin/what/what.c
index 5a9bf35..8bb97e5 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()
{
OpenPOWER on IntegriCloud