summaryrefslogtreecommitdiffstats
path: root/mbbsd/mbbsd.c
diff options
context:
space:
mode:
authorscw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-02-12 00:59:42 +0800
committerscw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-02-12 00:59:42 +0800
commit3f76b17cecfae6af61240a7ef9e5f21118e39f40 (patch)
tree97da043e3d50981124d1e8189cb8f9a7134f1288 /mbbsd/mbbsd.c
parent5832cb08c4136712641beec501dca2a99aeb0668 (diff)
downloadpttbbs-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/mbbsd.c')
-rw-r--r--mbbsd/mbbsd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c
index 7d8b2839..935111d7 100644
--- a/mbbsd/mbbsd.c
+++ b/mbbsd/mbbsd.c
@@ -766,7 +766,7 @@ setup_utmp(int mode)
strlcpy(remotebuf, fromhost, sizeof(fromhost));
strcat(remotebuf, ctime4(&now));
- remotebuf[strlen(remotebuf) - 1] = 0;
+ chomp(remotebuf);
add_distinct(buf, remotebuf);
#endif
if (enter_uflag & CLOAK_FLAG)