summaryrefslogtreecommitdiffstats
path: root/mbbsd/board.c
diff options
context:
space:
mode:
Diffstat (limited to 'mbbsd/board.c')
-rw-r--r--mbbsd/board.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/mbbsd/board.c b/mbbsd/board.c
index 58444c27..fa57f806 100644
--- a/mbbsd/board.c
+++ b/mbbsd/board.c
@@ -1,4 +1,4 @@
-/* $Id: board.c,v 1.70 2003/01/17 07:10:54 kcwu Exp $ */
+/* $Id: board.c,v 1.71 2003/01/17 07:14:14 kcwu Exp $ */
#include "bbs.h"
#define BRC_STRLEN 15 /* Length of board name */
#define BRC_MAXSIZE 24576
@@ -518,7 +518,6 @@ load_boards(char *key)
}
brdnum = 0;
if (class_bid <= 0) {
- boardstat_t *tmp = NULL;
nbrd = (boardstat_t *) malloc(sizeof(boardstat_t) * numboards);
for (i = 0; i < numboards; i++) {
if ((bptr = SHM->bsorted[type][i]) == NULL)
@@ -535,10 +534,7 @@ load_boards(char *key)
}
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);
- nbrd = tmp;
+ nbrd = realloc(nbrd, sizeof(boardstat_t) * brdnum);
} else {
nbrd = (boardstat_t *) malloc(bptr->childcount * sizeof(boardstat_t));
for (bptr = bptr->firstchild[type]; bptr != (boardheader_t *) ~ 0;