summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2016-04-03 13:17:43 +0200
committerHiltjo Posthuma <hiltjo@codemadness.org>2016-04-03 13:17:43 +0200
commitec7a6e018c7bddd3645f770d0350311653212963 (patch)
tree9801e92605520795d1e98b029336361c54b9c524
parent5f541922afef40e674ea673c54d4416bab619fa2 (diff)
just initialize to zero, no need for memset
-rw-r--r--sfeed.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sfeed.c b/sfeed.c
index 112a3f8..df00c38 100644
--- a/sfeed.c
+++ b/sfeed.c
@@ -427,7 +427,7 @@ parsetime(const char *s, time_t *tp)
{ STRP("December"), },
};
const char *end = NULL;
- int va[6], i, j, v, vi;
+ int va[6] = { 0 }, i, j, v, vi;
size_t m;
for (; *s && isspace((int)*s); s++)
@@ -435,7 +435,6 @@ parsetime(const char *s, time_t *tp)
if (!isdigit((int)*s) && !isalpha((int)*s))
return -1;
- memset(&va, 0, sizeof(va));
if (isdigit((int)*s)) {
/* format "%Y-%m-%d %H:%M:%S" or "%Y-%m-%dT%H:%M:%S" */
vi = 0;