summaryrefslogtreecommitdiffstats
path: root/plugins/check_ntp_peer.c
diff options
context:
space:
mode:
authorLorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>2023-11-23 10:07:31 +0100
committerGitHub <noreply@github.com>2023-11-23 10:07:31 +0100
commitdf690d695763ebbfebb60e22656ddea6cecb6690 (patch)
treedeabe01556ec4c66b32173aac748adf1b9bb91eb /plugins/check_ntp_peer.c
parentf054ab04e788405932b9bb081747bc7c8328a0d8 (diff)
parent4f4fb3d9afa1c45f3d1774c151af9b921d7d430d (diff)
downloadmonitoring-plugins-df690d6.tar.gz
Merge pull request #1964 from RincewindsHat/more_compiler_warnings
More compiler warnings
Diffstat (limited to 'plugins/check_ntp_peer.c')
-rw-r--r--plugins/check_ntp_peer.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/plugins/check_ntp_peer.c b/plugins/check_ntp_peer.c
index 4fb9018c..464a9e10 100644
--- a/plugins/check_ntp_peer.c
+++ b/plugins/check_ntp_peer.c
@@ -558,7 +558,6 @@ char *perfd_truechimers (int num_truechimers)
558 558
559int main(int argc, char *argv[]){ 559int main(int argc, char *argv[]){
560 int result, offset_result, stratum, num_truechimers; 560 int result, offset_result, stratum, num_truechimers;
561 int oresult, jresult, sresult, tresult = STATE_UNKNOWN;
562 double offset=0, jitter=0; 561 double offset=0, jitter=0;
563 char *result_line, *perfdata_line; 562 char *result_line, *perfdata_line;
564 563
@@ -595,18 +594,28 @@ int main(int argc, char *argv[]){
595 result = STATE_UNKNOWN; 594 result = STATE_UNKNOWN;
596 result = max_state_alt(result, get_status(fabs(offset), offset_thresholds)); 595 result = max_state_alt(result, get_status(fabs(offset), offset_thresholds));
597 } 596 }
598 oresult = result; 597
598 int oresult = result;
599
600
601 int tresult = STATE_UNKNOWN;
599 602
600 if(do_truechimers) { 603 if(do_truechimers) {
601 tresult = get_status(num_truechimers, truechimer_thresholds); 604 tresult = get_status(num_truechimers, truechimer_thresholds);
602 result = max_state_alt(result, tresult); 605 result = max_state_alt(result, tresult);
603 } 606 }
604 607
608
609 int sresult = STATE_UNKNOWN;
610
605 if(do_stratum) { 611 if(do_stratum) {
606 sresult = get_status(stratum, stratum_thresholds); 612 sresult = get_status(stratum, stratum_thresholds);
607 result = max_state_alt(result, sresult); 613 result = max_state_alt(result, sresult);
608 } 614 }
609 615
616
617 int jresult = STATE_UNKNOWN;
618
610 if(do_jitter) { 619 if(do_jitter) {
611 jresult = get_status(jitter, jitter_thresholds); 620 jresult = get_status(jitter, jitter_thresholds);
612 result = max_state_alt(result, jresult); 621 result = max_state_alt(result, jresult);