summaryrefslogtreecommitdiffstats
path: root/mbbsd/cal.c
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-05-05 17:57:21 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-05-05 17:57:21 +0800
commitd74ae1e8f983520c4fa0322daeedc9bcc9304710 (patch)
tree3a04ff9fc8b8b5fee6704e695d132a7cc3f4efb0 /mbbsd/cal.c
parentb31a0e3d53ce17d4626fe125dd1e1f654a0d192c (diff)
downloadpttbbs-d74ae1e8f983520c4fa0322daeedc9bcc9304710.tar
pttbbs-d74ae1e8f983520c4fa0322daeedc9bcc9304710.tar.gz
pttbbs-d74ae1e8f983520c4fa0322daeedc9bcc9304710.tar.bz2
pttbbs-d74ae1e8f983520c4fa0322daeedc9bcc9304710.tar.lz
pttbbs-d74ae1e8f983520c4fa0322daeedc9bcc9304710.tar.xz
pttbbs-d74ae1e8f983520c4fa0322daeedc9bcc9304710.tar.zst
pttbbs-d74ae1e8f983520c4fa0322daeedc9bcc9304710.zip
- (internal) replace all localtime4() by localtime4_r().
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4272 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/cal.c')
-rw-r--r--mbbsd/cal.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mbbsd/cal.c b/mbbsd/cal.c
index c0160ffd..d0233bc5 100644
--- a/mbbsd/cal.c
+++ b/mbbsd/cal.c
@@ -497,8 +497,9 @@ int
resolve_over18_user(const userec_t *u)
{
/* get local time */
- struct tm ptime = *localtime4(&now);
+ struct tm ptime;
+ localtime4_r(&now, &ptime);
// 照實歲計算,沒生日的當作未滿 18
if (u->year < 1 || u->month < 1)
return 0;