summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sfeed.c1
-rw-r--r--sfeed_frames.c4
2 files changed, 2 insertions, 3 deletions
diff --git a/sfeed.c b/sfeed.c
index a75d832..eab0dec 100644
--- a/sfeed.c
+++ b/sfeed.c
@@ -342,7 +342,6 @@ parsetime(const char *s, char *buf, size_t bufsiz, time_t *tp)
size_t i;
int tzoffset, r;
- memset(&tm, 0, sizeof(tm));
for (i = 0; formats[i]; i++) {
if (!(p = strptime(s, formats[i], &tm)))
continue;
diff --git a/sfeed_frames.c b/sfeed_frames.c
index 28bfa61..57efdf3 100644
--- a/sfeed_frames.c
+++ b/sfeed_frames.c
@@ -120,8 +120,8 @@ printfeed(FILE *fpitems, FILE *fpin, struct feed *f)
if (!(namelen = normalizepath(feedname, name, sizeof(name))))
return;
- if (strlcpy(dirpath, name, sizeof(dirpath)) >= sizeof(dirpath))
- errx(1, "strlcpy: path truncation");
+ strlcpy(dirpath, name, sizeof(dirpath));
+
/* directory doesn't exist: try to create it. */
if (stat(dirpath, &st) == -1 && mkdir(dirpath, S_IRWXU) == -1)
err(1, "mkdir: %s", dirpath);