From d74ae1e8f983520c4fa0322daeedc9bcc9304710 Mon Sep 17 00:00:00 2001 From: piaip Date: Mon, 5 May 2008 09:57:21 +0000 Subject: - (internal) replace all localtime4() by localtime4_r(). git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4272 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/vote.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'mbbsd/vote.c') diff --git a/mbbsd/vote.c b/mbbsd/vote.c index e27279dd..79a02246 100644 --- a/mbbsd/vote.c +++ b/mbbsd/vote.c @@ -144,10 +144,11 @@ vote_report(const char *bname, const char *fname, char *fpath) strlcpy(header.owner, "[馬路探子]", sizeof(header.owner)); snprintf(header.title, sizeof(header.title), "[%s] 看板 選情報導", bname); { - register struct tm *ptime = localtime4(&dtime); + struct tm ptime; + localtime4_r(&dtime, &ptime); snprintf(header.date, sizeof(header.date), - "%2d/%02d", ptime->tm_mon + 1, ptime->tm_mday); + "%2d/%02d", ptime.tm_mon + 1, ptime.tm_mday); } strlcpy(header.filename, ip, sizeof(header.filename)); -- cgit v1.2.3