From cf28d816e5c390aab9ee55d8d92f45bbc6551307 Mon Sep 17 00:00:00 2001 From: jlh Date: Sun, 29 Apr 2012 08:17:44 +0000 Subject: Use standard getopt(3) error message. Submitted by: jilles Approved by: kib (mentor) --- usr.bin/stdbuf/stdbuf.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/usr.bin/stdbuf/stdbuf.c b/usr.bin/stdbuf/stdbuf.c index c6951bb..b2ade7e 100644 --- a/usr.bin/stdbuf/stdbuf.c +++ b/usr.bin/stdbuf/stdbuf.c @@ -52,7 +52,7 @@ main(int argc, char *argv[]) int i; ibuf = obuf = ebuf = NULL; - while ((i = getopt(argc, argv, ":e:i:o:")) != -1) { + while ((i = getopt(argc, argv, "e:i:o:")) != -1) { switch (i) { case 'e': ebuf = optarg; @@ -63,13 +63,8 @@ main(int argc, char *argv[]) case 'o': obuf = optarg; break; - case ':': - warnx("Missing argument for option -%c", optopt); - usage(1); - break; case '?': default: - warnx("Unknown option: %c", optopt); usage(1); break; } -- cgit v1.1