From c0bcad7feb18bd1e3a1f98f2f41c437925a8dbf0 Mon Sep 17 00:00:00 2001 From: Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> Date: Mon, 4 Nov 2024 23:12:18 +0100 Subject: check_disk: Initialize most variables --- plugins/check_disk.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/plugins/check_disk.c b/plugins/check_disk.c index d1d1b92a..037a6f7a 100644 --- a/plugins/check_disk.c +++ b/plugins/check_disk.c @@ -156,20 +156,20 @@ static struct name_list *seen = NULL; int main(int argc, char **argv) { int result = STATE_UNKNOWN; int disk_result = STATE_UNKNOWN; - char *output; - char *ignored; - char *details; - char *perf; - char *perf_ilabel; + char *output = NULL; + char *ignored = NULL; + char *details = NULL; + char *perf = NULL; + char *perf_ilabel = NULL; char *preamble = " - free space:"; char *ignored_preamble = " - ignored paths:"; - char *flag_header; - int temp_result; + char *flag_header = NULL; + int temp_result = STATE_UNKNOWN; - struct mount_entry *me; - struct fs_usage fsp; - struct parameter_list *temp_list; - struct parameter_list *path; + struct mount_entry *me = NULL; + struct fs_usage fsp = {0}; + struct parameter_list *temp_list = NULL; + struct parameter_list *path = NULL; #ifdef __CYGWIN__ char mountdir[32]; -- cgit v1.2.3-74-g34f1