summaryrefslogtreecommitdiffstats
path: root/src/core/hw.c
diff options
context:
space:
mode:
authorHolger Lubitz2007-06-18 01:24:44 +0200
committerHolger Lubitz2007-07-06 20:19:55 +0200
commitaca232c9739e6cf13eb7a153e8db39a98de08a9b (patch)
tree75ab5832c7be1972976fbd22cfcddfec0ce01c2a /src/core/hw.c
parentconvert to zalloc (diff)
downloadipxe-aca232c9739e6cf13eb7a153e8db39a98de08a9b.tar.gz
ipxe-aca232c9739e6cf13eb7a153e8db39a98de08a9b.tar.xz
ipxe-aca232c9739e6cf13eb7a153e8db39a98de08a9b.zip
convert to zalloc
Diffstat (limited to 'src/core/hw.c')
-rw-r--r--src/core/hw.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/core/hw.c b/src/core/hw.c
index a3eb8500..64258b86 100644
--- a/src/core/hw.c
+++ b/src/core/hw.c
@@ -56,10 +56,9 @@ static int hw_open ( struct xfer_interface *xfer, struct uri *uri __unused ) {
struct hw *hw;
/* Allocate and initialise structure */
- hw = malloc ( sizeof ( *hw ) );
+ hw = zalloc ( sizeof ( *hw ) );
if ( ! hw )
return -ENOMEM;
- memset ( hw, 0, sizeof ( *hw ) );
xfer_init ( &hw->xfer, &hw_xfer_operations, &hw->refcnt );
process_init ( &hw->process, hw_step, &hw->refcnt );