diff options
author | Darell Tan <darell.tan@gmail.com> | 2011-09-19 22:38:20 +0800 |
---|---|---|
committer | Darell Tan <darell.tan@gmail.com> | 2011-09-19 22:38:20 +0800 |
commit | 0379c23415e88831c30a6d9548296199ead4a6e3 (patch) | |
tree | bfc49614eedafce43ada46ab25531d368557dbf1 | |
parent | 6f54e6bce3ccf7ad12a8f9a417fed4b4be16c463 (diff) | |
download | mdns-repeater-0379c23415e88831c30a6d9548296199ead4a6e3.tar.gz mdns-repeater-0379c23415e88831c30a6d9548296199ead4a6e3.zip |
getopt() prints an error message for us, so we don't have to bother.
-rw-r--r-- | mdns-repeater.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/mdns-repeater.c b/mdns-repeater.c index 05aa002..8192146 100644 --- a/mdns-repeater.c +++ b/mdns-repeater.c @@ -264,6 +264,12 @@ static int parse_opts(int argc, char *argv[]) { switch (c) { case 'h': help = 1; break; case 'f': foreground = 1; break; + + case '?': + case ':': + fputs("\n", stderr); + break; + default: fprintf(stderr, "unknown option %c\n", optopt); exit(2); |