diff options
-rw-r--r-- | sfeed_frames.c | 4 | ||||
-rw-r--r-- | sfeed_gopher.c | 4 | ||||
-rw-r--r-- | sfeed_html.c | 4 | ||||
-rw-r--r-- | sfeed_plain.c | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/sfeed_frames.c b/sfeed_frames.c index ed06397..f805e59 100644 --- a/sfeed_frames.c +++ b/sfeed_frames.c @@ -20,7 +20,7 @@ printfeed(FILE *fpitems, FILE *fpin, struct feed *f) char *fields[FieldLast]; ssize_t linelen; unsigned int isnew; - struct tm *tm; + struct tm rtm, *tm; time_t parsedtime; /* menu if not unnamed */ @@ -42,7 +42,7 @@ printfeed(FILE *fpitems, FILE *fpin, struct feed *f) parsedtime = 0; if (!strtotime(fields[FieldUnixTimestamp], &parsedtime) && - (tm = localtime(&parsedtime))) { + (tm = localtime_r(&parsedtime, &rtm))) { isnew = (parsedtime >= comparetime) ? 1 : 0; totalnew += isnew; f->totalnew += isnew; diff --git a/sfeed_gopher.c b/sfeed_gopher.c index 918dcda..b4e3a8c 100644 --- a/sfeed_gopher.c +++ b/sfeed_gopher.c @@ -41,7 +41,7 @@ printfeed(FILE *fpitems, FILE *fpin, struct feed *f) char *fields[FieldLast], *itemhost, *itemport, *itempath; ssize_t linelen; unsigned int isnew; - struct tm *tm; + struct tm rtm, *tm; time_t parsedtime; int itemtype; @@ -81,7 +81,7 @@ printfeed(FILE *fpitems, FILE *fpin, struct feed *f) parsedtime = 0; if (!strtotime(fields[FieldUnixTimestamp], &parsedtime) && - (tm = localtime(&parsedtime))) { + (tm = localtime_r(&parsedtime, &rtm))) { isnew = (parsedtime >= comparetime) ? 1 : 0; f->totalnew += isnew; diff --git a/sfeed_html.c b/sfeed_html.c index 911a01b..d1e1b63 100644 --- a/sfeed_html.c +++ b/sfeed_html.c @@ -19,7 +19,7 @@ static void printfeed(FILE *fp, struct feed *f) { char *fields[FieldLast]; - struct tm *tm; + struct tm rtm, *tm; time_t parsedtime; unsigned int isnew; ssize_t linelen; @@ -42,7 +42,7 @@ printfeed(FILE *fp, struct feed *f) parsedtime = 0; if (!strtotime(fields[FieldUnixTimestamp], &parsedtime) && - (tm = localtime(&parsedtime))) { + (tm = localtime_r(&parsedtime, &rtm))) { isnew = (parsedtime >= comparetime) ? 1 : 0; totalnew += isnew; f->totalnew += isnew; diff --git a/sfeed_plain.c b/sfeed_plain.c index 42f9626..1b11a71 100644 --- a/sfeed_plain.c +++ b/sfeed_plain.c @@ -16,7 +16,7 @@ static void printfeed(FILE *fp, const char *feedname) { char *fields[FieldLast]; - struct tm *tm; + struct tm rtm, *tm; time_t parsedtime; ssize_t linelen; @@ -27,7 +27,7 @@ printfeed(FILE *fp, const char *feedname) parsedtime = 0; if (!strtotime(fields[FieldUnixTimestamp], &parsedtime) && - (tm = localtime(&parsedtime))) { + (tm = localtime_r(&parsedtime, &rtm))) { if (parsedtime >= comparetime) fputs("N ", stdout); else |