diff options
author | 2007-09-08 17:59:23 +0000 | |
---|---|---|
committer | 2007-09-08 17:59:23 +0000 | |
commit | 84fa8e458205a63f275239cc8bef6b3883e0a2d3 (patch) | |
tree | 7b2a99b79fd5b20e0a04fc2ce59052395189e8fb /sys/dev/vnd.c | |
parent | Fix false negatives in dealing with unreachable code after calls to __dead (diff) | |
download | wireguard-openbsd-84fa8e458205a63f275239cc8bef6b3883e0a2d3.tar.xz wireguard-openbsd-84fa8e458205a63f275239cc8bef6b3883e0a2d3.zip |
more M_ZERO changes
ok pyr@ and krw@
Diffstat (limited to 'sys/dev/vnd.c')
-rw-r--r-- | sys/dev/vnd.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/dev/vnd.c b/sys/dev/vnd.c index 426c5739393..4373b0eee51 100644 --- a/sys/dev/vnd.c +++ b/sys/dev/vnd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vnd.c,v 1.79 2007/06/20 18:15:46 deraadt Exp $ */ +/* $OpenBSD: vnd.c,v 1.80 2007/09/08 17:59:23 gilles Exp $ */ /* $NetBSD: vnd.c,v 1.26 1996/03/30 23:06:11 christos Exp $ */ /* @@ -198,12 +198,11 @@ vndattach(int num) if (num <= 0) return; size = num * sizeof(struct vnd_softc); - mem = malloc(size, M_DEVBUF, M_NOWAIT); + mem = malloc(size, M_DEVBUF, M_NOWAIT|M_ZERO); if (mem == NULL) { printf("WARNING: no memory for vnode disks\n"); return; } - bzero(mem, size); vnd_softc = (struct vnd_softc *)mem; for (i = 0; i < num; i++) { rw_init(&vnd_softc[i].sc_rwlock, "vndlock"); |