Browse Source

convert to zalloc

tags/v0.9.3
Holger Lubitz 17 years ago
parent
commit
aca232c973
1 changed files with 1 additions and 2 deletions
  1. 1
    2
      src/core/hw.c

+ 1
- 2
src/core/hw.c View File

@@ -56,10 +56,9 @@ static int hw_open ( struct xfer_interface *xfer, struct uri *uri __unused ) {
56 56
 	struct hw *hw;
57 57
 
58 58
 	/* Allocate and initialise structure */
59
-	hw = malloc ( sizeof ( *hw ) );
59
+	hw = zalloc ( sizeof ( *hw ) );
60 60
 	if ( ! hw )
61 61
 		return -ENOMEM;
62
-	memset ( hw, 0, sizeof ( *hw ) );
63 62
 	xfer_init ( &hw->xfer, &hw_xfer_operations, &hw->refcnt );
64 63
 	process_init ( &hw->process, hw_step, &hw->refcnt );
65 64
 

Loading…
Cancel
Save