From d7ee00636947115c7dce4d615d35b293eb85710d Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Mon, 12 Oct 2015 07:08:30 +0200 Subject: improved error checking --- server/dolmetschctl.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/server/dolmetschctl.c b/server/dolmetschctl.c index fd63e99..5bb9965 100644 --- a/server/dolmetschctl.c +++ b/server/dolmetschctl.c @@ -156,13 +156,7 @@ int main(int argc, char* argv[]) osc_port = optarg; break; case '?': - if (optopt == 'x') - error(0, 0, "Option -%c requires an argument.\n", optopt); - else if (optopt == 'd') - error(0, 0, "Option -%c requires an argument.\n", optopt); - else if (optopt == 'm') - error(0, 0, "Option -%c requires an argument.\n", optopt); - else if (optopt == 'o') + if (optopt == 'x' || optopt == 'd' || optopt == 'm' || optopt == 'o') error(0, 0, "Option -%c requires an argument.\n", optopt); else if (isprint (optopt)) error(0, 0, "Unknown option `-%c'.\n", optopt); -- cgit v1.2.3