Introduction
Introduction Statistics Contact Development Disclaimer Help
tscrape_html/tscrape_plain: like sfeed, skip when a timestamp is empty/invalid …
git clone git://git.codemadness.org/tscrape
Log
Files
Refs
README
LICENSE
---
commit 423d3f5ad6023be3eb50ebe2f9504309bfe3d940
parent d34cbfb8d0bc3d985ce58ebfa3034115a0ef323d
Author: Hiltjo Posthuma <[email protected]>
Date: Fri, 20 Mar 2020 12:02:41 +0100
tscrape_html/tscrape_plain: like sfeed, skip when a timestamp is empty/invalid
Diffstat:
M tscrape_html.c | 3 ++-
M tscrape_plain.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/tscrape_html.c b/tscrape_html.c
@@ -39,7 +39,8 @@ printfeed(FILE *fp, struct feed *f)
break;
parsedtime = 0;
- strtotime(fields[FieldUnixTimestamp], &parsedtime);
+ if (strtotime(fields[FieldUnixTimestamp], &parsedtime))
+ continue;
if (!(tm = localtime(&parsedtime)))
err(1, "localtime");
diff --git a/tscrape_plain.c b/tscrape_plain.c
@@ -27,7 +27,8 @@ printfeed(FILE *fp, const char *feedname)
break;
parsedtime = 0;
- strtotime(fields[FieldUnixTimestamp], &parsedtime);
+ if (strtotime(fields[FieldUnixTimestamp], &parsedtime))
+ continue;
if (!(tm = localtime(&parsedtime)))
err(1, "localtime");
You are viewing proxied material from codemadness.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.