diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-02-13 21:28:20 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-02-13 21:28:20 +0800 |
commit | 8ecd8bddde9a768e94096f68ac25dd3bf6adf589 (patch) | |
tree | 41fb1b8bcd13de8690897252bade8cfdd87c666e | |
parent | ca06b8332c9eb4048bfdcc762608642a4c697c75 (diff) | |
download | pttbbs-8ecd8bddde9a768e94096f68ac25dd3bf6adf589.tar pttbbs-8ecd8bddde9a768e94096f68ac25dd3bf6adf589.tar.gz pttbbs-8ecd8bddde9a768e94096f68ac25dd3bf6adf589.tar.bz2 pttbbs-8ecd8bddde9a768e94096f68ac25dd3bf6adf589.tar.lz pttbbs-8ecd8bddde9a768e94096f68ac25dd3bf6adf589.tar.xz pttbbs-8ecd8bddde9a768e94096f68ac25dd3bf6adf589.tar.zst pttbbs-8ecd8bddde9a768e94096f68ac25dd3bf6adf589.zip |
- friend: use constants, prevent magic numbers
- mbbsd: guests do not need adding new favs
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3911 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | mbbsd/friend.c | 4 | ||||
-rw-r--r-- | mbbsd/mbbsd.c | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/mbbsd/friend.c b/mbbsd/friend.c index 53208cbc..2d666d97 100644 --- a/mbbsd/friend.c +++ b/mbbsd/friend.c @@ -229,7 +229,7 @@ delete_friend_from_file(const char *file, const char *string, int case_sensitiv void friend_delete(const char *uident, int type) { - char fn[80]; + char fn[STRLEN]; setfriendfile(fn, type); delete_friend_from_file(fn, uident, 0); } @@ -245,7 +245,7 @@ delete_user_friend(const char *uident, const char *thefriend, int type) void friend_delete_all(const char *uident, int type) { - char buf[80], line[80]; + char buf[PATHLEN], line[PATHLEN]; FILE *fp; sethomefile(buf, uident, friend_file[type]); diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c index 08fa5fc1..423333da 100644 --- a/mbbsd/mbbsd.c +++ b/mbbsd/mbbsd.c @@ -752,6 +752,7 @@ login_query(void) if (initcuser(uid)< 1) exit (0) ; cuser.userlevel = 0; cuser.uflag = PAGER_FLAG | BRDSORT_FLAG | MOVIE_FLAG; + cuser.uflag2= 0; // we don't need FAVNEW_FLAG or anything else. #ifdef GUEST_DEFAULT_DBCS_NOINTRESC cuser.uflag |= DBCS_NOINTRESC; |