diff options
author | Thordur I. Bjornsson <thib@cvs.openbsd.org> | 2009-01-04 20:36:24 +0000 |
---|---|---|
committer | Thordur I. Bjornsson <thib@cvs.openbsd.org> | 2009-01-04 20:36:24 +0000 |
commit | 33823eae7705f06296a10ec5411a0272eb863114 (patch) | |
tree | a203543cb9843e711c3d2223dc63e2a4603d09c2 /sys/dev/softraid_aoe.c | |
parent | f184333caaae2b5a14eaef856635d7190fa34099 (diff) |
malloc + memset(ah, 0, ...) to malloc with M_ZERO.
ok marco@ some time ago.
Diffstat (limited to 'sys/dev/softraid_aoe.c')
-rw-r--r-- | sys/dev/softraid_aoe.c | 5 |
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; |