diff options
-rw-r--r-- | sfeed.c | 1 | ||||
-rw-r--r-- | sfeed_frames.c | 4 |
2 files changed, 2 insertions, 3 deletions
@@ -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); |