]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
convert to zalloc
authorHolger Lubitz <hal@duncan.ol.sub.de>
Fri, 6 Jul 2007 19:08:29 +0000 (21:08 +0200)
committerHolger Lubitz <hal@duncan.ol.sub.de>
Fri, 6 Jul 2007 19:08:29 +0000 (21:08 +0200)
src/net/netdevice.c

index a5c8890e866e6438668ad2c8ff362815d75529d1..d72392ca0a959fa9eb492af70b2588dd89aa9c34 100644 (file)
@@ -265,9 +265,8 @@ struct net_device * alloc_netdev ( size_t priv_size ) {
        size_t total_len;
 
        total_len = ( sizeof ( *netdev ) + priv_size );
-       netdev = malloc ( total_len );
+       netdev = zalloc ( total_len );
        if ( netdev ) {
-               memset ( netdev, 0, total_len );
                netdev->refcnt.free = free_netdev;
                INIT_LIST_HEAD ( &netdev->tx_queue );
                INIT_LIST_HEAD ( &netdev->rx_queue );