sfeed

simple feed reader - forked from git.codemadness.org/sfeed
git clone git://src.gearsix.net/sfeed
Log | Files | Refs | Atom | README | LICENSE

commit 1ce0eaeb223072b94d77f5b818e48ae070ba9e5a
parent 70f8136a9b8b916af019e6bb4b6c8e363c7ca34c
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Sat, 27 Feb 2016 16:04:45 +0100

remove some unneeded checks

Diffstat:
Msfeed.c | 1-
Msfeed_frames.c | 4++--
2 files changed, 2 insertions(+), 3 deletions(-)

diff --git 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 @@ -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);