Browse Source

convert to zalloc

tags/v0.9.3
Holger Lubitz 17 years ago
parent
commit
a4d3476e0e
1 changed files with 1 additions and 2 deletions
  1. 1
    2
      src/net/udp/dhcp.c

+ 1
- 2
src/net/udp/dhcp.c View File

@@ -787,10 +787,9 @@ int start_dhcp ( struct job_interface *job, struct net_device *netdev,
787 787
 	int rc;
788 788
 
789 789
 	/* Allocate and initialise structure */
790
-	dhcp = malloc ( sizeof ( *dhcp ) );
790
+	dhcp = zalloc ( sizeof ( *dhcp ) );
791 791
 	if ( ! dhcp )
792 792
 		return -ENOMEM;
793
-	memset ( dhcp, 0, sizeof ( *dhcp ) );
794 793
 	dhcp->refcnt.free = dhcp_free;
795 794
 	job_init ( &dhcp->job, &dhcp_job_operations, &dhcp->refcnt );
796 795
 	xfer_init ( &dhcp->xfer, &dhcp_xfer_operations, &dhcp->refcnt );

Loading…
Cancel
Save