summaryrefslogtreecommitdiff
path: root/sfeed_mbox.c
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2017-12-24 12:58:44 +0100
committerHiltjo Posthuma <hiltjo@codemadness.org>2017-12-24 12:58:44 +0100
commitb232db436b7b9343c336ef941c47cf8b107d1f7e (patch)
tree1e49b07790ba186695dfd81fc53ccb287b17a00a /sfeed_mbox.c
parent21ba6ab0544e688c3ef78cdefbadfa76ed729190 (diff)
format programs: ignore fields with an invalid time
this makes sure tail -f with multiple files ignores the ==> file <== lines too.
Diffstat (limited to 'sfeed_mbox.c')
-rw-r--r--sfeed_mbox.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sfeed_mbox.c b/sfeed_mbox.c
index 9b9b5cf..995890b 100644
--- a/sfeed_mbox.c
+++ b/sfeed_mbox.c
@@ -125,7 +125,8 @@ printfeed(FILE *fp, const char *feedname)
if (!parseline(line, fields))
break;
parsedtime = 0;
- strtotime(fields[FieldUnixTimestamp], &parsedtime);
+ if (strtotime(fields[FieldUnixTimestamp], &parsedtime))
+ continue;
/* can't convert: default to formatted time for time_t 0. */
if (!gmtime_r(&parsedtime, &tm) ||
!strftime(timebuf, sizeof(timebuf),