summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2020-07-05 16:46:40 +0200
committerHiltjo Posthuma <hiltjo@codemadness.org>2020-07-05 16:46:40 +0200
commit17898c52f631c3dd10c11167aaa702e5756dde04 (patch)
treee2e6ef425d372201988fd2d33c23bbd54186bd07
parente8bbe3e72d14a3d81188ea3df4c2c14a5ab90f98 (diff)
sfeed_atom: minor simplification, gmtime_r is not needed here
-rw-r--r--sfeed_atom.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sfeed_atom.c b/sfeed_atom.c
index 0463ef7..2626b6c 100644
--- 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,