diff options
author | RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> | 2023-10-18 17:01:59 +0200 |
---|---|---|
committer | RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> | 2023-10-18 17:01:59 +0200 |
commit | ca5af12f9475775179a599875bf7cf8d3296f02a (patch) | |
tree | b3e9d3b0d327c6bd9e879ed3273b07949922dc88 /plugins | |
parent | 1ba64fb56683c7418d4d87565cdd52421edbb8c6 (diff) | |
download | monitoring-plugins-ca5af12f9475775179a599875bf7cf8d3296f02a.tar.gz |
check_ntp: Use C99 booleans
Diffstat (limited to 'plugins')
-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 99537c88..a5359436 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 int verbose=0; | 42 | static bool verbose = false; |
43 | static short do_offset=0; | 43 | static bool do_offset = false; |
44 | static char *owarn="60"; | 44 | static char *owarn="60"; |
45 | static char *ocrit="120"; | 45 | static char *ocrit="120"; |
46 | static short do_jitter=0; | 46 | static bool do_jitter = false; |
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++; | 699 | verbose = true; |
700 | break; | 700 | break; |
701 | case 'w': | 701 | case 'w': |
702 | do_offset=1; | 702 | do_offset = true; |
703 | owarn = optarg; | 703 | owarn = optarg; |
704 | break; | 704 | break; |
705 | case 'c': | 705 | case 'c': |
706 | do_offset=1; | 706 | do_offset = true; |
707 | ocrit = optarg; | 707 | ocrit = optarg; |
708 | break; | 708 | break; |
709 | case 'j': | 709 | case 'j': |
710 | do_jitter=1; | 710 | do_jitter = true; |
711 | jwarn = optarg; | 711 | jwarn = optarg; |
712 | break; | 712 | break; |
713 | case 'k': | 713 | case 'k': |
714 | do_jitter=1; | 714 | do_jitter = true; |
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[]){ |