From 63b324b6a0b428f59b63056f4cc6ae1bca69c3f7 Mon Sep 17 00:00:00 2001 From: in2 Date: Tue, 4 May 2004 15:01:49 +0000 Subject: avoid SHM->bsorted[type][n] == NULL git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1922 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- util/boardlist.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'util') diff --git a/util/boardlist.c b/util/boardlist.c index a37de82f..606a0192 100644 --- a/util/boardlist.c +++ b/util/boardlist.c @@ -9,8 +9,7 @@ load_uidofgid(const int gid, const int type) int n, childcount = 0; currbptr = &bcache[gid - 1]; for (n = 0; n < numboards; ++n) { - bptr = SHM->bsorted[type][n]; - if (bptr->brdname[0] == '\0') + if( !(bptr = SHM->bsorted[type][n]) || bptr->brdname[0] == '\0' ) continue; if (bptr->gid == gid) { if (currbptr == &bcache[gid - 1]) -- cgit v1.2.3