diff options
author | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-03-27 01:52:46 +0800 |
---|---|---|
committer | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-03-27 01:52:46 +0800 |
commit | fc4a128e1360ba9b3098656b35721323f173838f (patch) | |
tree | dca352ee376bdf37159386bf02b5e5aee7d7986f /mbbsd | |
parent | d1f3e1991d8a79317f421125f5bb61e1c5d79474 (diff) | |
download | pttbbs-fc4a128e1360ba9b3098656b35721323f173838f.tar pttbbs-fc4a128e1360ba9b3098656b35721323f173838f.tar.gz pttbbs-fc4a128e1360ba9b3098656b35721323f173838f.tar.bz2 pttbbs-fc4a128e1360ba9b3098656b35721323f173838f.tar.lz pttbbs-fc4a128e1360ba9b3098656b35721323f173838f.tar.xz pttbbs-fc4a128e1360ba9b3098656b35721323f173838f.tar.zst pttbbs-fc4a128e1360ba9b3098656b35721323f173838f.zip |
- fix syntax for old c compiler.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4029 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r-- | mbbsd/bbs.c | 10 | ||||
-rw-r--r-- | mbbsd/board.c | 5 | ||||
-rw-r--r-- | mbbsd/emaildb.c | 6 |
3 files changed, 13 insertions, 8 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c index 83cdb5c0..28881301 100644 --- a/mbbsd/bbs.c +++ b/mbbsd/bbs.c @@ -691,12 +691,16 @@ do_deleteCrossPost(const fileheader_t *fh, char bname[]) { char bdir[MAXPATHLEN]="", file[MAXPATHLEN]=""; fileheader_t newfh; + boardheader_t *bp; + int i, bid; + if(!bname || !fh) return; + if(!fh->filename[0]) return; - int i, bid = getbnum(bname); - if(bid <=0 || !fh->filename[0]) return; + bid = getbnum(bname); + if(bid <= 0) return; - boardheader_t *bp = getbcache(bid); + bp = getbcache(bid); if(!bp) return; setbdir(bdir, bname); diff --git a/mbbsd/board.c b/mbbsd/board.c index 1376e0da..a1ca7006 100644 --- a/mbbsd/board.c +++ b/mbbsd/board.c @@ -117,7 +117,7 @@ int enter_board(const char *boardname) } -void imovefav(int old) +static void imovefav(int old) { char buf[5]; int new; @@ -275,7 +275,6 @@ b_config(void) { boardheader_t *bp=NULL; int touched = 0, finished = 0; - bp = getbcache(currbid); int i = 0, attr = 0, ipostres; char isBM = (currmode & MODE_BOARD) || HasUserPerm(PERM_SYSOP); // perm cache @@ -289,6 +288,8 @@ b_config(void) int ytitle = b_lines - LNBOARDINFO; + bp = getbcache(currbid); + #ifdef OLDRECOMMEND ytitle ++; #endif // OLDRECOMMEND diff --git a/mbbsd/emaildb.c b/mbbsd/emaildb.c index fa057102..47a2c95b 100644 --- a/mbbsd/emaildb.c +++ b/mbbsd/emaildb.c @@ -97,6 +97,9 @@ int emaildb_update_email(char * userid, int userid_len, char * email, int email_ int ret = -1; pid_t pid = -1; + sqlite3 *Db = NULL; + sqlite3_stmt *Stmt = NULL; + #ifdef FORK_MODEL switch((pid = fork())) { @@ -113,9 +116,6 @@ int emaildb_update_email(char * userid, int userid_len, char * email, int email_ } #endif - sqlite3 *Db = NULL; - sqlite3_stmt *Stmt = NULL; - if (emaildb_open(&Db) != SQLITE_OK) goto end; |