aboutsummaryrefslogtreecommitdiff
path: root/hw/lpc-rtc.c
diff options
context:
space:
mode:
authorStewart Smith <stewart@linux.vnet.ibm.com>2015-11-17 17:04:32 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-11-17 17:04:32 +1100
commit524031fab3af2aec916a92c88d66ff94f66cf570 (patch)
tree1232a43442b292e1256b5bb50a44a1b8a7b81387 /hw/lpc-rtc.c
parent14ed2b842f61cfc234a274c5f626d7d8f81e7aa9 (diff)
downloadskiboot-524031fab3af2aec916a92c88d66ff94f66cf570.zip
skiboot-524031fab3af2aec916a92c88d66ff94f66cf570.tar.gz
skiboot-524031fab3af2aec916a92c88d66ff94f66cf570.tar.bz2
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 <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw/lpc-rtc.c')
-rw-r--r--hw/lpc-rtc.c2
1 files changed, 2 insertions, 0 deletions
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 */