diff options
author | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-03-12 11:24:46 +0800 |
---|---|---|
committer | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-03-12 11:24:46 +0800 |
commit | bf0ff170400889443fd3e3fffc6b1ae2b1738d68 (patch) | |
tree | 33b84a25b6b5809e2c526515de2b516f634ecb4d /mbbsd/chicken.c | |
parent | 4d791013a709c9269c4e4872fd9d379168d0f47a (diff) | |
download | pttbbs-bf0ff170400889443fd3e3fffc6b1ae2b1738d68.tar pttbbs-bf0ff170400889443fd3e3fffc6b1ae2b1738d68.tar.gz pttbbs-bf0ff170400889443fd3e3fffc6b1ae2b1738d68.tar.bz2 pttbbs-bf0ff170400889443fd3e3fffc6b1ae2b1738d68.tar.lz pttbbs-bf0ff170400889443fd3e3fffc6b1ae2b1738d68.tar.xz pttbbs-bf0ff170400889443fd3e3fffc6b1ae2b1738d68.tar.zst pttbbs-bf0ff170400889443fd3e3fffc6b1ae2b1738d68.zip |
move global variable xuser into local, save 512 bytes.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2596 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/chicken.c')
-rw-r--r-- | mbbsd/chicken.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/mbbsd/chicken.c b/mbbsd/chicken.c index 7de5c848..e4928ea4 100644 --- a/mbbsd/chicken.c +++ b/mbbsd/chicken.c @@ -85,7 +85,7 @@ static const short time_change[NUM_KINDS][14] = int reload_chicken(void) { - + userec_t xuser; chicken_t *mychicken = &cuser.mychicken; passwd_query(usernum, &xuser); @@ -891,8 +891,7 @@ chickenpk(int fd) strlcpy(mateid, currutmp->mateid, sizeof(mateid)); /* 把對手的id用local buffer記住 */ - getuser(mateid); - memcpy(&ouser, &xuser, sizeof(userec_t)); + getuser(mateid, &ouser); reload_chicken(); if (!ochicken->name[0] || !mychicken->name[0]) { bell(); @@ -907,8 +906,7 @@ chickenpk(int fd) while (1) { r = random(); ch = igetch(); - getuser(mateid); - memcpy(&ouser, &xuser, sizeof(userec_t)); + getuser(mateid, &ouser); reload_chicken(); show_chicken_data(ochicken, mychicken); time_diff(mychicken); |