[monitoring-plugins] check_dbi: Fix compiler warning for uninitialized ...

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


 Module: monitoring-plugins
 Branch: master
 Commit: 0c92b3908341f41b2202d04efe5fd46f1462dbe3
 Author: RincewindsHat <12514511+RincewindsHat at users.noreply.github.com>
   Date: Thu Oct 19 11:14:23 2023 +0200
    URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=0c92b39

check_dbi: Fix compiler warning for uninitialized variable

---

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

diff --git a/plugins/check_dbi.c b/plugins/check_dbi.c
index c24ca24..29c8520 100644
--- a/plugins/check_dbi.c
+++ b/plugins/check_dbi.c
@@ -141,7 +141,7 @@ main (int argc, char **argv)
 	if (verbose > 2)
 		printf ("Initializing DBI\n");
 
-	dbi_inst *instance_p;
+	dbi_inst *instance_p = { 0 };
 
 	if (dbi_initialize_r(NULL, instance_p) < 0) {
 		printf ("UNKNOWN - failed to initialize DBI; possibly you don't have any drivers installed.\n");



More information about the Commits mailing list