From ca5af12f9475775179a599875bf7cf8d3296f02a Mon Sep 17 00:00:00 2001 From: RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> Date: Wed, 18 Oct 2023 17:01:59 +0200 Subject: check_ntp: Use C99 booleans --- plugins/check_ntp.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'plugins') 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"; #include "utils.h" static char *server_address=NULL; -static int verbose=0; -static short do_offset=0; +static bool verbose = false; +static bool do_offset = false; static char *owarn="60"; static char *ocrit="120"; -static short do_jitter=0; +static bool do_jitter = false; static char *jwarn="5000"; static char *jcrit="10000"; @@ -696,26 +696,26 @@ int process_arguments(int argc, char **argv){ exit(STATE_UNKNOWN); break; case 'v': - verbose++; + verbose = true; break; case 'w': - do_offset=1; + do_offset = true; owarn = optarg; break; case 'c': - do_offset=1; + do_offset = true; ocrit = optarg; break; case 'j': - do_jitter=1; + do_jitter = true; jwarn = optarg; break; case 'k': - do_jitter=1; + do_jitter = true; jcrit = optarg; break; case 'H': - if(is_host(optarg) == FALSE) + if(is_host(optarg) == false) usage2(_("Invalid hostname/address"), optarg); server_address = strdup(optarg); break; @@ -749,9 +749,9 @@ int process_arguments(int argc, char **argv){ char *perfd_offset (double offset) { return fperfdata ("offset", offset, "s", - TRUE, offset_thresholds->warning->end, - TRUE, offset_thresholds->critical->end, - FALSE, 0, FALSE, 0); + true, offset_thresholds->warning->end, + true, offset_thresholds->critical->end, + false, 0, false, 0); } char *perfd_jitter (double jitter) @@ -759,7 +759,7 @@ char *perfd_jitter (double jitter) return fperfdata ("jitter", jitter, "s", do_jitter, jitter_thresholds->warning->end, do_jitter, jitter_thresholds->critical->end, - TRUE, 0, FALSE, 0); + true, 0, false, 0); } int main(int argc, char *argv[]){ -- cgit v1.2.3-74-g34f1