diff options
author | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-01-20 00:06:06 +0800 |
---|---|---|
committer | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-01-20 00:06:06 +0800 |
commit | 795d7da28a8514e8315643820badb86919da2e2e (patch) | |
tree | 1911b4e7e874dd5999ea49ac5767ca720c7ac2e9 /mbbsd/vice.c | |
parent | 26382c16358fd5e6746a7a4d00210248b0c255c5 (diff) | |
download | pttbbs-795d7da28a8514e8315643820badb86919da2e2e.tar pttbbs-795d7da28a8514e8315643820badb86919da2e2e.tar.gz pttbbs-795d7da28a8514e8315643820badb86919da2e2e.tar.bz2 pttbbs-795d7da28a8514e8315643820badb86919da2e2e.tar.lz pttbbs-795d7da28a8514e8315643820badb86919da2e2e.tar.xz pttbbs-795d7da28a8514e8315643820badb86919da2e2e.tar.zst pttbbs-795d7da28a8514e8315643820badb86919da2e2e.zip |
* there are so many fopen() without fclose()
* assert fopen()
* clean up
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@638 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/vice.c')
-rw-r--r-- | mbbsd/vice.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mbbsd/vice.c b/mbbsd/vice.c index acc653fa..2f5aa310 100644 --- a/mbbsd/vice.c +++ b/mbbsd/vice.c @@ -1,4 +1,4 @@ -/* $Id: vice.c,v 1.6 2002/07/22 19:02:01 in2 Exp $ */ +/* $Id: vice.c,v 1.7 2003/01/19 16:06:06 kcwu Exp $ */ #include "bbs.h" #define VICE_PLAY BBSHOME "/etc/vice/vice.play" @@ -22,7 +22,7 @@ vice_load(char tbingo[6][15]) int i = 0; if (!fb) return -1; - bzero((char *)tbingo, sizeof(tbingo)); + bzero((char *)tbingo, 6*15); while (i < 6 && fgets(buf, 15, fb)) { if ((ptr = strchr(buf, '\n'))) *ptr = 0; @@ -53,7 +53,7 @@ ran_showfile(int y, int x, char *filename, int maxnum) FILE *fs; char buf[512]; - bzero(buf, sizeof(char) * 512); + bzero(buf, sizeof(buf)); snprintf(buf, sizeof(buf), "%s%d", filename, rand() % maxnum + 1); if (!(fs = fopen(buf, "r"))) { move(10, 10); |