From bbcb1720403de2f1f003fb1bc8e4c458413169ed Mon Sep 17 00:00:00 2001
From: Jens Nolte <jens@nightmarestudio.de>
Date: Fri, 24 Jan 2020 03:17:49 +0100
Subject: [PATCH] Properly clear ntp timeinfo struct

---
 main/ntp.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/main/ntp.cpp b/main/ntp.cpp
index 4e17359..9b4faa9 100644
--- a/main/ntp.cpp
+++ b/main/ntp.cpp
@@ -24,7 +24,8 @@ static ntpd_parameter_t parameter;
 
 void ntp_task(void *ignored) {
     time_t now = 0;
-    struct tm timeinfo = { 0 };
+    struct tm timeinfo;
+    memset(&timeinfo, 0, sizeof(tm));
 
     ESP_LOGI(TAG, "Configuring ntp");
     sntp_setoperatingmode(SNTP_OPMODE_POLL);
-- 
GitLab