From b7c23c8e5b31eca5bcaa8aa882cd7444ba59fc43 Mon Sep 17 00:00:00 2001 From: haukepetersen Date: Tue, 30 Jun 2015 13:23:14 +0200 Subject: [PATCH] sys/vtimer: initialize all values in get_localtime --- sys/vtimer/vtimer.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/vtimer/vtimer.c b/sys/vtimer/vtimer.c index 3593a6daf7..1033575a90 100644 --- a/sys/vtimer/vtimer.c +++ b/sys/vtimer/vtimer.c @@ -308,11 +308,10 @@ void vtimer_get_localtime(struct tm *localt) timex_t now; vtimer_now(&now); + memset(localt, 0, sizeof(struct tm)); localt->tm_sec = now.seconds % 60; localt->tm_min = (now.seconds / 60) % 60; localt->tm_hour = (now.seconds / 60 / 60) % 24; - - // TODO: fill the other fields } void vtimer_init(void)