diff options
author | Hiltjo Posthuma <hiltjo@codemadness.org> | 2017-12-24 12:58:44 +0100 |
---|---|---|
committer | Hiltjo Posthuma <hiltjo@codemadness.org> | 2017-12-24 12:58:44 +0100 |
commit | b232db436b7b9343c336ef941c47cf8b107d1f7e (patch) | |
tree | 1e49b07790ba186695dfd81fc53ccb287b17a00a /sfeed_frames.c | |
parent | 21ba6ab0544e688c3ef78cdefbadfa76ed729190 (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_frames.c')
-rw-r--r-- | sfeed_frames.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sfeed_frames.c b/sfeed_frames.c index 7df8528..34d6d4e 100644 --- a/sfeed_frames.c +++ b/sfeed_frames.c @@ -145,7 +145,8 @@ printfeed(FILE *fpitems, FILE *fpin, struct feed *f) break; parsedtime = 0; - strtotime(fields[FieldUnixTimestamp], &parsedtime); + if (strtotime(fields[FieldUnixTimestamp], &parsedtime)) + continue; if (!(tm = localtime(&parsedtime))) err(1, "localtime"); |