Use standard getopt(3) error message.

Submitted by:	jilles
Approved by:	kib (mentor)
This commit is contained in:
Jeremie Le Hen 2012-04-29 08:17:44 +00:00
parent ab07718555
commit 3c2ded8bbc

View File

@ -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;
}