summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mbbsd/edit.c4
-rw-r--r--mbbsd/read.c8
-rw-r--r--mbbsd/talk.c4
3 files changed, 8 insertions, 8 deletions
diff --git a/mbbsd/edit.c b/mbbsd/edit.c
index f585fab8..dd8bb578 100644
--- a/mbbsd/edit.c
+++ b/mbbsd/edit.c
@@ -1,4 +1,4 @@
-/* $Id: edit.c,v 1.26 2003/01/19 16:06:06 kcwu Exp $ */
+/* $Id: edit.c,v 1.27 2003/01/19 16:18:17 kcwu Exp $ */
#include "bbs.h"
typedef struct textline_t {
struct textline_t *prev;
@@ -42,7 +42,7 @@ static char fp_bak[] = "bak";
/* 記憶體管理與編輯處理 */
static void
-indigestion(i)
+indigestion(int i)
{
fprintf(stderr, "嚴重內傷 %d\n", i);
}
diff --git a/mbbsd/read.c b/mbbsd/read.c
index b926a852..5243a0cd 100644
--- a/mbbsd/read.c
+++ b/mbbsd/read.c
@@ -1,4 +1,4 @@
-/* $Id: read.c,v 1.16 2003/01/17 08:16:21 kcwu Exp $ */
+/* $Id: read.c,v 1.17 2003/01/19 16:18:17 kcwu Exp $ */
#include "bbs.h"
#define MAXPATHLEN 256
@@ -164,6 +164,7 @@ int
TagPruner(int bid)
{
boardheader_t *bp;
+ assert(bid>0);
bp = getbcache(bid);
if (strcmp(bp->brdname, "Security") == 0)
return DONOTHING;
@@ -172,7 +173,6 @@ TagPruner(int bid)
return FULLUPDATE;
delete_range(currdirect, 0, 0);
TagNum = 0;
- if (bid > 0);
setbtotal(bid);
return NEWDIRECT;
}
@@ -452,8 +452,8 @@ select_read(keeploc_t * locmem, int sr_mode)
register char *tag, *query, *temp;
fileheader_t fh;
char fpath[80], genbuf[MAXPATHLEN], buf3[5];
- char static t_ans[TTLEN + 1] = "";
- char static a_ans[TTLEN + 1] = "";
+ static char t_ans[TTLEN + 1] = "";
+ static char a_ans[TTLEN + 1] = "";
int fd, fr, size = sizeof(fileheader_t);
struct stat st;
/* rocker.011018: make a reference number for process article */
diff --git a/mbbsd/talk.c b/mbbsd/talk.c
index 2bc1ac53..60f2aa85 100644
--- a/mbbsd/talk.c
+++ b/mbbsd/talk.c
@@ -1,4 +1,4 @@
-/* $Id: talk.c,v 1.99 2003/01/16 11:58:04 kcwu Exp $ */
+/* $Id: talk.c,v 1.100 2003/01/19 16:18:17 kcwu Exp $ */
#include "bbs.h"
#define QCAST int (*)(const void *, const void *)
@@ -252,7 +252,7 @@ logout_friend_online(userinfo_t * utmp)
utmp->friend_online[i] = 0;
ui = &SHM->uinfo[j];
if (ui->pid && ui != utmp) {
- for (k = 0; k < ui->friendtotal > 0 && k < MAX_FRIEND &&
+ for (k = 0; k < ui->friendtotal && k < MAX_FRIEND &&
(int)(ui->friend_online[k] & 0xFFFFFF) != offset; k++);
if (k < ui->friendtotal) {
ui->friendtotal--;