summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
authorkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-01-19 21:24:14 +0800
committerkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-01-19 21:24:14 +0800
commitf807e4d5b72507336d691fd79eac4bccdef85ddb (patch)
treee06f0ec2ca630559504231dbc2122b2301386312 /mbbsd
parent66328f0a996dae3dc365d36dc5a9d0fd1ce78145 (diff)
downloadpttbbs-f807e4d5b72507336d691fd79eac4bccdef85ddb.tar
pttbbs-f807e4d5b72507336d691fd79eac4bccdef85ddb.tar.gz
pttbbs-f807e4d5b72507336d691fd79eac4bccdef85ddb.tar.bz2
pttbbs-f807e4d5b72507336d691fd79eac4bccdef85ddb.tar.lz
pttbbs-f807e4d5b72507336d691fd79eac4bccdef85ddb.tar.xz
pttbbs-f807e4d5b72507336d691fd79eac4bccdef85ddb.tar.zst
pttbbs-f807e4d5b72507336d691fd79eac4bccdef85ddb.zip
add some assert() code, but disable first.
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@636 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/Makefile5
-rw-r--r--mbbsd/io.c3
2 files changed, 6 insertions, 2 deletions
diff --git a/mbbsd/Makefile b/mbbsd/Makefile
index 2a206efe..1cd74870 100644
--- a/mbbsd/Makefile
+++ b/mbbsd/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.15 2003/01/16 12:27:54 kcwu Exp $
+# $Id: Makefile,v 1.16 2003/01/19 13:24:14 kcwu Exp $
# 訂義基本初值
BBSHOME?= $(HOME)
@@ -12,6 +12,9 @@ LIBS+= -lcrypt
# 在 CFLAGS內加入定義 COMPILE_TIME
CFLAGS+= "-DCOMPILE_TIME=\"`date`\""
+# 稍後再 enable assert()
+CFLAGS+= -DNDEBUG
+
# FreeBSD特有的環境
CFLAGS_FreeBSD= -DHAVE_SETPROCTITLE -DFreeBSD
LDFLAGS_FreeBSD=
diff --git a/mbbsd/io.c b/mbbsd/io.c
index 9b34bd12..1629f7cb 100644
--- a/mbbsd/io.c
+++ b/mbbsd/io.c
@@ -1,4 +1,4 @@
-/* $Id: io.c,v 1.26 2003/01/15 09:41:19 in2 Exp $ */
+/* $Id: io.c,v 1.27 2003/01/19 13:24:14 kcwu Exp $ */
#include "bbs.h"
#if defined(linux)
@@ -37,6 +37,7 @@ output(char *s, int len)
{
/* Invalid if len >= OBUFSIZE */
+ assert(len<OBUFSIZE);
if (obufsize + len > OBUFSIZE) {
write(1, outbuf, obufsize);
obufsize = 0;