summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2009-10-27 21:37:18 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2009-10-27 21:37:18 +0800
commit67fd14d06f96c8e22c558ee517ec6b8185d5f9e9 (patch)
treec5796233b6a1bc881a63b623a94353294e409ca7
parent45ba3a7cba31c011227f613d9fb4768ca156a262 (diff)
downloadpttbbs-67fd14d06f96c8e22c558ee517ec6b8185d5f9e9.tar
pttbbs-67fd14d06f96c8e22c558ee517ec6b8185d5f9e9.tar.gz
pttbbs-67fd14d06f96c8e22c558ee517ec6b8185d5f9e9.tar.bz2
pttbbs-67fd14d06f96c8e22c558ee517ec6b8185d5f9e9.tar.lz
pttbbs-67fd14d06f96c8e22c558ee517ec6b8185d5f9e9.tar.xz
pttbbs-67fd14d06f96c8e22c558ee517ec6b8185d5f9e9.tar.zst
pttbbs-67fd14d06f96c8e22c558ee517ec6b8185d5f9e9.zip
* happy commit r5000!
* revert bzero because it's deprecated in posix. git-svn-id: http://opensvn.csie.org/pttbbs/trunk@5000 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--pttbbs/common/sys/vbuf.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/pttbbs/common/sys/vbuf.c b/pttbbs/common/sys/vbuf.c
index 41f86e45..0fa6f24c 100644
--- a/pttbbs/common/sys/vbuf.c
+++ b/pttbbs/common/sys/vbuf.c
@@ -24,7 +24,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <strings.h>
#include <errno.h>
#include <assert.h>
@@ -82,7 +81,7 @@ VBUFPROTO void
vbuf_new(VBUF *v, size_t szbuf)
{
assert(szbuf > 1);
- bzero(v, sizeof(*v)); // memset(v, 0, sizeof(*v));
+ memset(v, 0, sizeof(*v));
v->buf = (char*)malloc(szbuf);
assert(v->buf);
v->buf_end = v->buf + szbuf;
@@ -94,7 +93,7 @@ VBUFPROTO void
vbuf_delete(VBUF *v)
{
free(v->buf);
- bzero(v, sizeof(*v)); // memset(v, 0, sizeof(*v));
+ memset(v, 0, sizeof(*v));
}
VBUFPROTO void
@@ -109,7 +108,7 @@ vbuf_attach(VBUF *v, char *buf, size_t szbuf)
VBUFPROTO void
vbuf_detach(VBUF *v)
{
- bzero(v, sizeof(*v)); // memset(v, 0, sizeof(*v));
+ memset(v, 0, sizeof(*v));
}
VBUFPROTO void