From 524031fab3af2aec916a92c88d66ff94f66cf570 Mon Sep 17 00:00:00 2001 From: Stewart Smith Date: Tue, 17 Nov 2015 17:04:32 +1100 Subject: lpc-rtc: zero out struct tm before read Picked up by static analysis. Never in a billion years would this affect the real world. Signed-off-by: Stewart Smith --- hw/lpc-rtc.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'hw/lpc-rtc.c') diff --git a/hw/lpc-rtc.c b/hw/lpc-rtc.c index 63124df..95506cd 100644 --- a/hw/lpc-rtc.c +++ b/hw/lpc-rtc.c @@ -119,6 +119,8 @@ static void lpc_init_time(void) struct tm tm; bool valid; + memset(&tm, 0, sizeof(tm)); + lock(&rtc_lock); /* If update is in progress, wait a bit */ -- cgit v1.1