summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2015-08-05 12:50:18 +0200
committerHiltjo Posthuma <hiltjo@codemadness.org>2015-08-05 13:03:16 +0200
commitc1c5db91a1591048dbce73760691c12fa76e8e2b (patch)
treea5883aea7df3987ffc3e4d811ff0f8f35d81779b
parent394ffefd882b99bdbfead397ccab0b771ec4b0fe (diff)
sfeed_mbox: combine date check condition
-rw-r--r--sfeed_mbox.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sfeed_mbox.c b/sfeed_mbox.c
index 6e171cb..2e315f1 100644
--- a/sfeed_mbox.c
+++ b/sfeed_mbox.c
@@ -77,11 +77,9 @@ printfeed(FILE *fp, const char *feedname)
errx(1, "can't format current time");
while (parseline(&line, &linesize, fields, fp) > 0) {
- if ((r = strtotime(fields[FieldUnixTimestamp], &parsedtime)) == -1)
- continue; /* invalid date */
- if (!gmtime_r(&parsedtime, &tm))
- continue; /* invalid date */
- if (!strftime(timebuf, sizeof(timebuf),
+ if ((r = strtotime(fields[FieldUnixTimestamp], &parsedtime)) == -1 ||
+ !gmtime_r(&parsedtime, &tm) ||
+ !strftime(timebuf, sizeof(timebuf),
"%a, %d %b %Y %H:%M +0000", &tm))
continue; /* invalid date */