diff options
author | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-08-12 15:24:51 +0800 |
---|---|---|
committer | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-08-12 15:24:51 +0800 |
commit | 59412f931afadb4a89e711761580749fc3d761a9 (patch) | |
tree | 86a8f974d402c10201f1e63e9fd9b8da2a3549c9 /mbbsd | |
parent | da6382afa9cc31ed70b028839f8188953a061a9c (diff) | |
download | pttbbs-59412f931afadb4a89e711761580749fc3d761a9.tar pttbbs-59412f931afadb4a89e711761580749fc3d761a9.tar.gz pttbbs-59412f931afadb4a89e711761580749fc3d761a9.tar.bz2 pttbbs-59412f931afadb4a89e711761580749fc3d761a9.tar.lz pttbbs-59412f931afadb4a89e711761580749fc3d761a9.tar.xz pttbbs-59412f931afadb4a89e711761580749fc3d761a9.tar.zst pttbbs-59412f931afadb4a89e711761580749fc3d761a9.zip |
use NULL instead of (~ 0) in class linked-list
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1092 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r-- | mbbsd/board.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mbbsd/board.c b/mbbsd/board.c index 5307fa04..eb6a13d4 100644 --- a/mbbsd/board.c +++ b/mbbsd/board.c @@ -704,9 +704,9 @@ load_uidofgid(const int gid, const int type) } bcache[gid - 1].childcount = childcount; if (currbptr == &bcache[gid - 1]) - currbptr->firstchild[type] = (boardheader_t *) ~ 0; + currbptr->firstchild[type] = NULL; else - currbptr->next[type] = (boardheader_t *) ~ 0; + currbptr->next[type] = NULL; } static boardstat_t * @@ -826,7 +826,7 @@ load_boards(char *key) } else { int childcount = bptr->childcount; nbrd = (boardstat_t *) malloc(childcount * sizeof(boardstat_t)); - for (bptr = bptr->firstchild[type]; bptr != (boardheader_t *) ~ 0; + for (bptr = bptr->firstchild[type]; bptr != NULL; bptr = bptr->next[type]) { n = (int)(bptr - bcache); if (!((state = Ben_Perm(bptr)) || (currmode & MODE_MENU)) |