9
0
Fork 0

net/tap: use xzalloc to allocate data

this will ensure the data are set to 0 (list as example)

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Jean-Christophe PLAGNIOL-VILLARD 2012-09-20 07:36:43 +02:00 committed by Sascha Hauer
parent fc5caa43a8
commit 660809446f
1 changed files with 2 additions and 2 deletions

View File

@ -79,7 +79,7 @@ int tap_probe(struct device_d *dev)
struct tap_priv *priv;
int ret = 0;
priv = xmalloc(sizeof(struct tap_priv));
priv = xzalloc(sizeof(struct tap_priv));
priv->name = "barebox";
priv->fd = tap_alloc(priv->name);
@ -88,7 +88,7 @@ int tap_probe(struct device_d *dev)
goto out;
}
edev = xmalloc(sizeof(struct eth_device));
edev = xzalloc(sizeof(struct eth_device));
edev->priv = priv;
edev->parent = dev;