summaryrefslogtreecommitdiffstats
path: root/mbbsd/lovepaper.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/lovepaper.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/lovepaper.c')
-rw-r--r--mbbsd/lovepaper.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/mbbsd/lovepaper.c b/mbbsd/lovepaper.c
index 50c643bb..3003cdb2 100644
--- a/mbbsd/lovepaper.c
+++ b/mbbsd/lovepaper.c
@@ -9,13 +9,14 @@ x_love(void)
char receiver[61], path[STRLEN] = "home/";
int x, y = 0, tline = 0, poem = 0;
FILE *fp, *fpo;
- struct tm *gtime;
+ struct tm gtime;
fileheader_t mhdr;
setutmpmode(LOVE);
- gtime = localtime4(&now);
+
+ localtime4_r(&now, &gtime);
snprintf(buf1, sizeof(buf1), "%c/%s/love%d%d",
- cuser.userid[0], cuser.userid, gtime->tm_sec, gtime->tm_min);
+ cuser.userid[0], cuser.userid, gtime.tm_sec, gtime.tm_min);
strcat(path, buf1);
move(1, 0);
clrtobot();