sfeed

Simple RSS and Atom feed parser
git clone https://git.sinitax.com/codemadness/sfeed
Log | Files | Refs | README | LICENSE | Upstream | sfeed.txt

commit 17898c52f631c3dd10c11167aaa702e5756dde04
parent e8bbe3e72d14a3d81188ea3df4c2c14a5ab90f98
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Sun,  5 Jul 2020 16:46:40 +0200

sfeed_atom: minor simplification, gmtime_r is not needed here

Diffstat:
Msfeed_atom.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sfeed_atom.c b/sfeed_atom.c @@ -39,7 +39,7 @@ static void printfeed(FILE *fp, const char *feedname) { char *fields[FieldLast]; - struct tm tmitem, *tm; + struct tm *tm; time_t parsedtime; ssize_t linelen; @@ -76,7 +76,7 @@ printfeed(FILE *fp, const char *feedname) parsedtime = 0; if (strtotime(fields[FieldUnixTimestamp], &parsedtime) || - !(tm = gmtime_r(&parsedtime, &tmitem))) + !(tm = gmtime(&parsedtime))) tm = &tmnow; fprintf(stdout, "\t<updated>%04d-%02d-%02dT%02d:%02d:%02dZ</updated>\n", tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday,