summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorThordur I. Bjornsson <thib@cvs.openbsd.org>2009-01-04 20:36:24 +0000
committerThordur I. Bjornsson <thib@cvs.openbsd.org>2009-01-04 20:36:24 +0000
commit33823eae7705f06296a10ec5411a0272eb863114 (patch)
treea203543cb9843e711c3d2223dc63e2a4603d09c2 /sys
parentf184333caaae2b5a14eaef856635d7190fa34099 (diff)
malloc + memset(ah, 0, ...) to malloc with M_ZERO.
ok marco@ some time ago.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/softraid_aoe.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/dev/softraid_aoe.c b/sys/dev/softraid_aoe.c
index 0bbf072318f..8855c01485e 100644
--- a/sys/dev/softraid_aoe.c
+++ b/sys/dev/softraid_aoe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid_aoe.c,v 1.3 2008/12/24 19:32:02 marco Exp $ */
+/* $OpenBSD: softraid_aoe.c,v 1.4 2009/01/04 20:36:23 thib Exp $ */
/*
* Copyright (c) 2008 Ted Unangst <tedu@openbsd.org>
* Copyright (c) 2008 Marco Peereboom <marco@openbsd.org>
@@ -115,8 +115,7 @@ sr_aoe_alloc_resources(struct sr_discipline *sd)
}
shelf = htons(shelf);
- ah = malloc(sizeof(*ah), M_DEVBUF, M_WAITOK);
- memset(ah, 0, sizeof(*ah));
+ ah = malloc(sizeof(*ah), M_DEVBUF, M_WAITOK | M_ZERO);
ah->ifp = ifp;
ah->major = shelf;
ah->minor = slot;