[monitoring-plugins] check_ssh: Always initialize elapsed_time

RincewindsHat git at monitoring-plugins.org
Thu Oct 31 16:20:12 CET 2024


 Module: monitoring-plugins
 Branch: master
 Commit: 04115904adc237dbb2a4224728b0f5a49d617703
 Author: RincewindsHat <12514511+RincewindsHat at users.noreply.github.com>
   Date: Wed Aug 28 23:39:57 2024 +0200
    URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=0411590

check_ssh: Always initialize elapsed_time

---

 plugins/check_ssh.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plugins/check_ssh.c b/plugins/check_ssh.c
index 34ef37b..3c1a594 100644
--- a/plugins/check_ssh.c
+++ b/plugins/check_ssh.c
@@ -222,7 +222,7 @@ ssh_connect (char *haddr, int hport, char *remote_version, char *remote_protocol
 	char *ssh_server = NULL;
 	static char *rev_no = VERSION;
 	struct timeval tv;
-	double elapsed_time;
+	double elapsed_time = 0;
 
 	gettimeofday(&tv, NULL);
 



More information about the Commits mailing list