diff options
author | scw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-02-12 00:59:42 +0800 |
---|---|---|
committer | scw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-02-12 00:59:42 +0800 |
commit | 3f76b17cecfae6af61240a7ef9e5f21118e39f40 (patch) | |
tree | 97da043e3d50981124d1e8189cb8f9a7134f1288 /mbbsd/cache.c | |
parent | 5832cb08c4136712641beec501dca2a99aeb0668 (diff) | |
download | pttbbs-3f76b17cecfae6af61240a7ef9e5f21118e39f40.tar pttbbs-3f76b17cecfae6af61240a7ef9e5f21118e39f40.tar.gz pttbbs-3f76b17cecfae6af61240a7ef9e5f21118e39f40.tar.bz2 pttbbs-3f76b17cecfae6af61240a7ef9e5f21118e39f40.tar.lz pttbbs-3f76b17cecfae6af61240a7ef9e5f21118e39f40.tar.xz pttbbs-3f76b17cecfae6af61240a7ef9e5f21118e39f40.tar.zst pttbbs-3f76b17cecfae6af61240a7ef9e5f21118e39f40.zip |
Use chomp() instead of assigning '\0' directly.
Change a little code in searching of more() to reduce call of strlen().
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2495 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/cache.c')
-rw-r--r-- | mbbsd/cache.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mbbsd/cache.c b/mbbsd/cache.c index 4369c9f1..c5936331 100644 --- a/mbbsd/cache.c +++ b/mbbsd/cache.c @@ -929,7 +929,7 @@ reload_fcache(void) else { strncpy(SHM->home_desc[SHM->home_num], ip, sizeof(SHM->home_desc[SHM->home_num])); - SHM->home_desc[SHM->home_num][strlen(SHM->home_desc[SHM->home_num]) - 1] = 0; + chomp(SHM->home_desc[SHM->home_num]); } (SHM->home_num)++; if (SHM->home_num == MAX_FROM) |