From: Karel Zak Date: Mon, 29 Apr 2024 13:21:20 +0000 (+0200) Subject: hwclock: initialize parser variables X-Git-Tag: v2.42-start~365 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=764879a35f614b68ed4ab03dae9f31195393a257;p=thirdparty%2Futil-linux.git hwclock: initialize parser variables Signed-off-by: Karel Zak --- diff --git a/sys-utils/hwclock-parse-date.y b/sys-utils/hwclock-parse-date.y index 834d8af0c..0d996cc87 100644 --- a/sys-utils/hwclock-parse-date.y +++ b/sys-utils/hwclock-parse-date.y @@ -1265,16 +1265,16 @@ int parse_date(struct timespec *result, char const *p, time_t Start; intmax_t Start_ns; struct tm const *tmp; - struct tm tm; - struct tm tm0; - parser_control pc; - struct timespec gettime_buffer; + struct tm tm = { 0 }; + struct tm tm0 = { 0 }; + parser_control pc = { 0 }; + struct timespec gettime_buffer = { 0 }; unsigned char c; int tz_was_altered = 0; char *tz0 = NULL; char tz0buf[TZBUFSIZE]; int ok = 1; - struct timeval tv; + struct timeval tv = { 0 }; if (! now) { gettimeofday (&tv, NULL);