diff options
-rw-r--r-- | plugins/check_tcp.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/plugins/check_tcp.c b/plugins/check_tcp.c index 5fe024be..bbb8d111 100644 --- a/plugins/check_tcp.c +++ b/plugins/check_tcp.c | |||
@@ -373,8 +373,8 @@ process_arguments (int argc, char **argv) | |||
373 | int option = 0; | 373 | int option = 0; |
374 | static struct option longopts[] = { | 374 | static struct option longopts[] = { |
375 | {"hostname", required_argument, 0, 'H'}, | 375 | {"hostname", required_argument, 0, 'H'}, |
376 | {"critical-time", required_argument, 0, 'c'}, | 376 | {"critical", required_argument, 0, 'c'}, |
377 | {"warning-time", required_argument, 0, 'w'}, | 377 | {"warning", required_argument, 0, 'w'}, |
378 | {"critical-codes", required_argument, 0, 'C'}, | 378 | {"critical-codes", required_argument, 0, 'C'}, |
379 | {"warning-codes", required_argument, 0, 'W'}, | 379 | {"warning-codes", required_argument, 0, 'W'}, |
380 | {"timeout", required_argument, 0, 't'}, | 380 | {"timeout", required_argument, 0, 't'}, |
@@ -454,20 +454,14 @@ process_arguments (int argc, char **argv) | |||
454 | server_address = optarg; | 454 | server_address = optarg; |
455 | break; | 455 | break; |
456 | case 'c': /* critical */ | 456 | case 'c': /* critical */ |
457 | if (!is_intnonneg (optarg)) | 457 | critical_time = strtod (optarg, NULL); |
458 | usage4 (_("Critical threshold must be a positive integer")); | ||
459 | else | ||
460 | critical_time = strtod (optarg, NULL); | ||
461 | flags |= FLAG_TIME_CRIT; | 458 | flags |= FLAG_TIME_CRIT; |
462 | break; | 459 | break; |
463 | case 'j': /* hide output */ | 460 | case 'j': /* hide output */ |
464 | flags |= FLAG_HIDE_OUTPUT; | 461 | flags |= FLAG_HIDE_OUTPUT; |
465 | break; | 462 | break; |
466 | case 'w': /* warning */ | 463 | case 'w': /* warning */ |
467 | if (!is_intnonneg (optarg)) | 464 | warning_time = strtod (optarg, NULL); |
468 | usage4 (_("Warning threshold must be a positive integer")); | ||
469 | else | ||
470 | warning_time = strtod (optarg, NULL); | ||
471 | flags |= FLAG_TIME_WARN; | 465 | flags |= FLAG_TIME_WARN; |
472 | break; | 466 | break; |
473 | case 'C': | 467 | case 'C': |