Browse Source

convert to zalloc

tags/v0.9.3
Holger Lubitz 17 years ago
parent
commit
32e4ca8ae3
1 changed files with 1 additions and 2 deletions
  1. 1
    2
      src/net/netdevice.c

+ 1
- 2
src/net/netdevice.c View File

265
 	size_t total_len;
265
 	size_t total_len;
266
 
266
 
267
 	total_len = ( sizeof ( *netdev ) + priv_size );
267
 	total_len = ( sizeof ( *netdev ) + priv_size );
268
-	netdev = malloc ( total_len );
268
+	netdev = zalloc ( total_len );
269
 	if ( netdev ) {
269
 	if ( netdev ) {
270
-		memset ( netdev, 0, total_len );
271
 		netdev->refcnt.free = free_netdev;
270
 		netdev->refcnt.free = free_netdev;
272
 		INIT_LIST_HEAD ( &netdev->tx_queue );
271
 		INIT_LIST_HEAD ( &netdev->tx_queue );
273
 		INIT_LIST_HEAD ( &netdev->rx_queue );
272
 		INIT_LIST_HEAD ( &netdev->rx_queue );

Loading…
Cancel
Save