diff options
author | RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> | 2023-10-19 08:18:12 (GMT) |
---|---|---|
committer | RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> | 2023-10-19 08:18:12 (GMT) |
commit | 93a4bae90d7548fef77182e9624f51fbc6e8c360 (patch) | |
tree | cd26f05a2e233e159e237b9601ea264098034f0b /plugins/check_ntp.c | |
parent | d820929dd8316c4410b2369177832151d31dc99a (diff) | |
download | monitoring-plugins-93a4bae90d7548fef77182e9624f51fbc6e8c360.tar.gz |
Revert "check_ntp: Use C99 booleans"
This reverts commit ca5af12f9475775179a599875bf7cf8d3296f02a.
Diffstat (limited to 'plugins/check_ntp.c')
-rw-r--r-- | plugins/check_ntp.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/plugins/check_ntp.c b/plugins/check_ntp.c index a535943..99537c8 100644 --- a/plugins/check_ntp.c +++ b/plugins/check_ntp.c | |||
@@ -39,11 +39,11 @@ const char *email = "devel@monitoring-plugins.org"; | |||
39 | #include "utils.h" | 39 | #include "utils.h" |
40 | 40 | ||
41 | static char *server_address=NULL; | 41 | static char *server_address=NULL; |
42 | static bool verbose = false; | 42 | static int verbose=0; |
43 | static bool do_offset = false; | 43 | static short do_offset=0; |
44 | static char *owarn="60"; | 44 | static char *owarn="60"; |
45 | static char *ocrit="120"; | 45 | static char *ocrit="120"; |
46 | static bool do_jitter = false; | 46 | static short do_jitter=0; |
47 | static char *jwarn="5000"; | 47 | static char *jwarn="5000"; |
48 | static char *jcrit="10000"; | 48 | static char *jcrit="10000"; |
49 | 49 | ||
@@ -696,26 +696,26 @@ int process_arguments(int argc, char **argv){ | |||
696 | exit(STATE_UNKNOWN); | 696 | exit(STATE_UNKNOWN); |
697 | break; | 697 | break; |
698 | case 'v': | 698 | case 'v': |
699 | verbose = true; | 699 | verbose++; |
700 | break; | 700 | break; |
701 | case 'w': | 701 | case 'w': |
702 | do_offset = true; | 702 | do_offset=1; |
703 | owarn = optarg; | 703 | owarn = optarg; |
704 | break; | 704 | break; |
705 | case 'c': | 705 | case 'c': |
706 | do_offset = true; | 706 | do_offset=1; |
707 | ocrit = optarg; | 707 | ocrit = optarg; |
708 | break; | 708 | break; |
709 | case 'j': | 709 | case 'j': |
710 | do_jitter = true; | 710 | do_jitter=1; |
711 | jwarn = optarg; | 711 | jwarn = optarg; |
712 | break; | 712 | break; |
713 | case 'k': | 713 | case 'k': |
714 | do_jitter = true; | 714 | do_jitter=1; |
715 | jcrit = optarg; | 715 | jcrit = optarg; |
716 | break; | 716 | break; |
717 | case 'H': | 717 | case 'H': |
718 | if(is_host(optarg) == false) | 718 | if(is_host(optarg) == FALSE) |
719 | usage2(_("Invalid hostname/address"), optarg); | 719 | usage2(_("Invalid hostname/address"), optarg); |
720 | server_address = strdup(optarg); | 720 | server_address = strdup(optarg); |
721 | break; | 721 | break; |
@@ -749,9 +749,9 @@ int process_arguments(int argc, char **argv){ | |||
749 | char *perfd_offset (double offset) | 749 | char *perfd_offset (double offset) |
750 | { | 750 | { |
751 | return fperfdata ("offset", offset, "s", | 751 | return fperfdata ("offset", offset, "s", |
752 | true, offset_thresholds->warning->end, | 752 | TRUE, offset_thresholds->warning->end, |
753 | true, offset_thresholds->critical->end, | 753 | TRUE, offset_thresholds->critical->end, |
754 | false, 0, false, 0); | 754 | FALSE, 0, FALSE, 0); |
755 | } | 755 | } |
756 | 756 | ||
757 | char *perfd_jitter (double jitter) | 757 | char *perfd_jitter (double jitter) |
@@ -759,7 +759,7 @@ char *perfd_jitter (double jitter) | |||
759 | return fperfdata ("jitter", jitter, "s", | 759 | return fperfdata ("jitter", jitter, "s", |
760 | do_jitter, jitter_thresholds->warning->end, | 760 | do_jitter, jitter_thresholds->warning->end, |
761 | do_jitter, jitter_thresholds->critical->end, | 761 | do_jitter, jitter_thresholds->critical->end, |
762 | true, 0, false, 0); | 762 | TRUE, 0, FALSE, 0); |
763 | } | 763 | } |
764 | 764 | ||
765 | int main(int argc, char *argv[]){ | 765 | int main(int argc, char *argv[]){ |