diff options
Diffstat (limited to 'plugins/check_ping.c')
-rw-r--r-- | plugins/check_ping.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/plugins/check_ping.c b/plugins/check_ping.c index 56c9557..7ff7f28 100644 --- a/plugins/check_ping.c +++ b/plugins/check_ping.c | |||
@@ -151,7 +151,7 @@ main (int argc, char **argv) | |||
151 | int | 151 | int |
152 | process_arguments (int argc, char **argv) | 152 | process_arguments (int argc, char **argv) |
153 | { | 153 | { |
154 | int c, i = 1; | 154 | int c = 1; |
155 | 155 | ||
156 | #ifdef HAVE_GETOPT_H | 156 | #ifdef HAVE_GETOPT_H |
157 | int option_index = 0; | 157 | int option_index = 0; |
@@ -455,15 +455,12 @@ run_ping (char *command_line) | |||
455 | else | 455 | else |
456 | sprintf (warn_text, "%s %s", warn_text, input_buffer); | 456 | sprintf (warn_text, "%s %s", warn_text, input_buffer); |
457 | 457 | ||
458 | if (strstr (input_buffer, "DUPLICATES FOUND")) | 458 | if (strstr (input_buffer, "DUPLICATES FOUND")) { |
459 | /* cannot use the max function since STATE_UNKNOWN is max | ||
460 | result = max (result, STATE_WARNING); */ | ||
461 | if( !(result == STATE_CRITICAL) ){ | 459 | if( !(result == STATE_CRITICAL) ){ |
462 | result = STATE_WARNING; | 460 | result = STATE_WARNING; |
463 | } | 461 | } |
462 | } | ||
464 | else | 463 | else |
465 | /* cannot use the max function since STATE_UNKNOWN is max | ||
466 | result = max (result, STATE_CRITICAL); */ | ||
467 | result = STATE_CRITICAL ; | 464 | result = STATE_CRITICAL ; |
468 | } | 465 | } |
469 | (void) fclose (child_stderr); | 466 | (void) fclose (child_stderr); |