diff options
author | 2015-07-12 18:40:49 +0000 | |
---|---|---|
committer | 2015-07-12 18:40:49 +0000 | |
commit | 3c3844617c581d3f2bbb214b66dbbec3dc4a82c0 (patch) | |
tree | d62630378231fcf88b93b76e3fe7f9155da66a7d /lib/libutil/imsg-buffer.c | |
parent | Convert openssl(1) dsaparam to the new option handling. (diff) | |
download | wireguard-openbsd-3c3844617c581d3f2bbb214b66dbbec3dc4a82c0.tar.xz wireguard-openbsd-3c3844617c581d3f2bbb214b66dbbec3dc4a82c0.zip |
Use memset instead of bzero for better portability.
ok gilles claudio doug
Diffstat (limited to 'lib/libutil/imsg-buffer.c')
-rw-r--r-- | lib/libutil/imsg-buffer.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/libutil/imsg-buffer.c b/lib/libutil/imsg-buffer.c index 00e03b9d1b9..bac62f1e38e 100644 --- a/lib/libutil/imsg-buffer.c +++ b/lib/libutil/imsg-buffer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: imsg-buffer.c,v 1.6 2015/07/03 14:50:14 brynet Exp $ */ +/* $OpenBSD: imsg-buffer.c,v 1.7 2015/07/12 18:40:49 nicm Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -149,7 +149,7 @@ ibuf_write(struct msgbuf *msgbuf) unsigned int i = 0; ssize_t n; - bzero(&iov, sizeof(iov)); + memset(&iov, 0, sizeof(iov)); TAILQ_FOREACH(buf, &msgbuf->bufs, entry) { if (i >= IOV_MAX) break; @@ -233,9 +233,9 @@ msgbuf_write(struct msgbuf *msgbuf) char buf[CMSG_SPACE(sizeof(int))]; } cmsgbuf; - bzero(&iov, sizeof(iov)); - bzero(&msg, sizeof(msg)); - bzero(&cmsgbuf, sizeof(cmsgbuf)); + memset(&iov, 0, sizeof(iov)); + memset(&msg, 0, sizeof(msg)); + memset(&cmsgbuf, 0, sizeof(cmsgbuf)); TAILQ_FOREACH(buf, &msgbuf->bufs, entry) { if (i >= IOV_MAX) break; |