[monitoring-plugins] check_ntp: Initialize intermediate results in any ...

RincewindsHat git at monitoring-plugins.org
Wed Nov 22 23:40:13 CET 2023


 Module: monitoring-plugins
 Branch: master
 Commit: 7ba8463506b3d246c246a0caa0d78f0d16b321c6
 Author: RincewindsHat <12514511+RincewindsHat at users.noreply.github.com>
   Date: Thu Oct 19 11:59:43 2023 +0200
    URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=7ba8463

check_ntp: Initialize intermediate results in any case

---

 plugins/check_ntp_peer.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/plugins/check_ntp_peer.c b/plugins/check_ntp_peer.c
index d4e5fd9..4fb9018 100644
--- a/plugins/check_ntp_peer.c
+++ b/plugins/check_ntp_peer.c
@@ -557,7 +557,8 @@ char *perfd_truechimers (int num_truechimers)
 }
 
 int main(int argc, char *argv[]){
-	int result, offset_result, stratum, num_truechimers, oresult, jresult, sresult, tresult;
+	int result, offset_result, stratum, num_truechimers;
+	int oresult, jresult, sresult, tresult = STATE_UNKNOWN;
 	double offset=0, jitter=0;
 	char *result_line, *perfdata_line;
 



More information about the Commits mailing list