summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin')
-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