diff options
-rw-r--r-- | plugins/check_ntp_time.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/plugins/check_ntp_time.c b/plugins/check_ntp_time.c index 46cc604f..b2e16556 100644 --- a/plugins/check_ntp_time.c +++ b/plugins/check_ntp_time.c | |||
@@ -45,7 +45,7 @@ const char *email = "devel@monitoring-plugins.org"; | |||
45 | static char *server_address=NULL; | 45 | static char *server_address=NULL; |
46 | static char *port="123"; | 46 | static char *port="123"; |
47 | static int verbose=0; | 47 | static int verbose=0; |
48 | static int quiet=0; | 48 | static bool quiet = false; |
49 | static char *owarn="60"; | 49 | static char *owarn="60"; |
50 | static char *ocrit="120"; | 50 | static char *ocrit="120"; |
51 | static int time_offset=0; | 51 | static int time_offset=0; |
@@ -485,7 +485,7 @@ int process_arguments(int argc, char **argv){ | |||
485 | verbose++; | 485 | verbose++; |
486 | break; | 486 | break; |
487 | case 'q': | 487 | case 'q': |
488 | quiet = 1; | 488 | quiet = true; |
489 | break; | 489 | break; |
490 | case 'w': | 490 | case 'w': |
491 | owarn = optarg; | 491 | owarn = optarg; |
@@ -494,7 +494,7 @@ int process_arguments(int argc, char **argv){ | |||
494 | ocrit = optarg; | 494 | ocrit = optarg; |
495 | break; | 495 | break; |
496 | case 'H': | 496 | case 'H': |
497 | if(is_host(optarg) == FALSE) | 497 | if(!is_host(optarg)) |
498 | usage2(_("Invalid hostname/address"), optarg); | 498 | usage2(_("Invalid hostname/address"), optarg); |
499 | server_address = strdup(optarg); | 499 | server_address = strdup(optarg); |
500 | break; | 500 | break; |
@@ -531,12 +531,11 @@ int process_arguments(int argc, char **argv){ | |||
531 | return 0; | 531 | return 0; |
532 | } | 532 | } |
533 | 533 | ||
534 | char *perfd_offset (double offset) | 534 | char *perfd_offset (double offset) { |
535 | { | ||
536 | return fperfdata ("offset", offset, "s", | 535 | return fperfdata ("offset", offset, "s", |
537 | TRUE, offset_thresholds->warning->end, | 536 | true, offset_thresholds->warning->end, |
538 | TRUE, offset_thresholds->critical->end, | 537 | true, offset_thresholds->critical->end, |
539 | FALSE, 0, FALSE, 0); | 538 | false, 0, false, 0); |
540 | } | 539 | } |
541 | 540 | ||
542 | int main(int argc, char *argv[]){ | 541 | int main(int argc, char *argv[]){ |
@@ -566,7 +565,7 @@ int main(int argc, char *argv[]){ | |||
566 | 565 | ||
567 | offset = offset_request(server_address, &offset_result); | 566 | offset = offset_request(server_address, &offset_result); |
568 | if (offset_result == STATE_UNKNOWN) { | 567 | if (offset_result == STATE_UNKNOWN) { |
569 | result = (quiet == 1 ? STATE_UNKNOWN : STATE_CRITICAL); | 568 | result = ( (!quiet) ? STATE_UNKNOWN : STATE_CRITICAL); |
570 | } else { | 569 | } else { |
571 | result = get_status(fabs(offset), offset_thresholds); | 570 | result = get_status(fabs(offset), offset_thresholds); |
572 | } | 571 | } |