From 2f6083f59f0045c5c982e8e047d2ef81dbb8f01b Mon Sep 17 00:00:00 2001 From: Joseph Sutton Date: Wed, 20 Sep 2023 17:04:00 +1200 Subject: [PATCH] =?UTF-8?q?lib:audit=5Flogging:=20Initialize=20=E2=80=98tm?= =?UTF-8?q?=E2=80=99=20structure?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ‘tm’ must be initialized prior to calling strptime(). Signed-off-by: Joseph Sutton Reviewed-by: Andrew Bartlett --- lib/audit_logging/tests/audit_logging_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/audit_logging/tests/audit_logging_test.c b/lib/audit_logging/tests/audit_logging_test.c index d41f9517c47..09238823399 100644 --- a/lib/audit_logging/tests/audit_logging_test.c +++ b/lib/audit_logging/tests/audit_logging_test.c @@ -830,7 +830,7 @@ static void test_audit_get_timestamp(_UNUSED_ void **state) { const char *t = NULL; char *c; - struct tm tm; + struct tm tm = {}; time_t before; time_t after; time_t actual;