diff options
author | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-01-17 15:10:54 +0800 |
---|---|---|
committer | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-01-17 15:10:54 +0800 |
commit | b4af03248cb1ab7117932302115d6eb670a5dfe4 (patch) | |
tree | e2a3133d396363c00398c1ee644ed2113f2a6bcf /mbbsd | |
parent | 56559dcfe5456a46ed8f017c30ae4b703f75c6c7 (diff) | |
download | pttbbs-b4af03248cb1ab7117932302115d6eb670a5dfe4.tar pttbbs-b4af03248cb1ab7117932302115d6eb670a5dfe4.tar.gz pttbbs-b4af03248cb1ab7117932302115d6eb670a5dfe4.tar.bz2 pttbbs-b4af03248cb1ab7117932302115d6eb670a5dfe4.tar.lz pttbbs-b4af03248cb1ab7117932302115d6eb670a5dfe4.tar.xz pttbbs-b4af03248cb1ab7117932302115d6eb670a5dfe4.tar.zst pttbbs-b4af03248cb1ab7117932302115d6eb670a5dfe4.zip |
don't sort many times within loop -_-
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@617 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r-- | mbbsd/board.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/mbbsd/board.c b/mbbsd/board.c index 4d5a42dc..58444c27 100644 --- a/mbbsd/board.c +++ b/mbbsd/board.c @@ -1,4 +1,4 @@ -/* $Id: board.c,v 1.69 2003/01/17 07:08:04 kcwu Exp $ */ +/* $Id: board.c,v 1.70 2003/01/17 07:10:54 kcwu Exp $ */ #include "bbs.h" #define BRC_STRLEN 15 /* Length of board name */ #define BRC_MAXSIZE 24576 @@ -532,10 +532,9 @@ load_boards(char *key) (class_bid == -1 && bptr->nuser < 5)) continue; addnewbrdstat(n, state); - - if (class_bid == -1) - qsort(nbrd, brdnum, sizeof(boardstat_t), cmpboardfriends); } + if (class_bid == -1) + qsort(nbrd, brdnum, sizeof(boardstat_t), cmpboardfriends); tmp = (boardstat_t *) malloc(sizeof(boardstat_t) * brdnum); memcpy(tmp, nbrd, sizeof(boardstat_t) * brdnum); free(nbrd); |