summaryrefslogtreecommitdiffstats
path: root/plugins/check_ntp.c
diff options
context:
space:
mode:
authorRincewindsHat <12514511+RincewindsHat@users.noreply.github.com>2023-10-19 08:18:12 (GMT)
committerRincewindsHat <12514511+RincewindsHat@users.noreply.github.com>2023-10-19 08:18:12 (GMT)
commit93a4bae90d7548fef77182e9624f51fbc6e8c360 (patch)
treecd26f05a2e233e159e237b9601ea264098034f0b /plugins/check_ntp.c
parentd820929dd8316c4410b2369177832151d31dc99a (diff)
downloadmonitoring-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.c26
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
41static char *server_address=NULL; 41static char *server_address=NULL;
42static bool verbose = false; 42static int verbose=0;
43static bool do_offset = false; 43static short do_offset=0;
44static char *owarn="60"; 44static char *owarn="60";
45static char *ocrit="120"; 45static char *ocrit="120";
46static bool do_jitter = false; 46static short do_jitter=0;
47static char *jwarn="5000"; 47static char *jwarn="5000";
48static char *jcrit="10000"; 48static 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){
749char *perfd_offset (double offset) 749char *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
757char *perfd_jitter (double jitter) 757char *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
765int main(int argc, char *argv[]){ 765int main(int argc, char *argv[]){