Permalink
Browse files

Use standard getopt(3) error message.

Submitted by:	jilles
Approved by:	kib (mentor)
  • Loading branch information...
jlh jlh
jlh authored and jlh committed Apr 29, 2012
1 parent cc061f8 commit d1593c5b2035c3c4807d7ab08a73ad1efd29986a
Showing with 1 addition and 6 deletions.
  1. +1 −6 usr.bin/stdbuf/stdbuf.c
View
@@ -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;
}

0 comments on commit d1593c5

Please sign in to comment.