From d66d1361509acbb4452776eb5621051ebd9c2c08 Mon Sep 17 00:00:00 2001 From: kcwu Date: Fri, 17 Jan 2003 07:10:54 +0000 Subject: don't sort many times within loop -_- git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk@617 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- pttbbs/mbbsd/board.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pttbbs/mbbsd/board.c b/pttbbs/mbbsd/board.c index 4d5a42dc..58444c27 100644 --- a/pttbbs/mbbsd/board.c +++ b/pttbbs/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); -- cgit v1.2.3