diff options
author | Erich Eckner <git@eckner.net> | 2018-11-02 10:29:02 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-11-02 10:29:02 +0100 |
commit | f7565eaa06955be0ed024c46f466586c879f4fbc (patch) | |
tree | 620c45eca754941d1512bec8708858d82b16f0ac /input_gadgets.c | |
parent | 010ebe05197f5b738fe7eb78a1c8ec135d93e516 (diff) | |
download | anzeige-f7565eaa06955be0ed024c46f466586c879f4fbc.tar.xz |
input_gadgets.c: memset time_struct to 0
Diffstat (limited to 'input_gadgets.c')
-rw-r--r-- | input_gadgets.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/input_gadgets.c b/input_gadgets.c index 292a112..dfd9ea4 100644 --- a/input_gadgets.c +++ b/input_gadgets.c @@ -172,6 +172,7 @@ char *gadgets_retrieve_current_temperature(char *output, int max_len) char* ende = output; if (max_len > 0) { struct tm time_struct; + memset(&time_struct, 0, sizeof(time_struct)); if (strptime((char*)(chunk.memory + rm[1].rm_so),"%d.%m.%Y um %H:%M MEZ",&time_struct) == NULL) { fprintf(stderr, "Failed to parse time '%.*s'\n", (int)(rm[1].rm_eo - rm[1].rm_so), (char*)(chunk.memory + rm[1].rm_so)); free(chunk.memory); |