diff options
author | Panagiotis Issaris <takis@issaris.org> | 2006-07-21 14:51:30 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-07-21 14:51:30 -0700 |
commit | 0da974f4f303a6842516b764507e3c0a03f41e5a (patch) | |
tree | 8872aec792f02040269c6769dd1009b20f71d186 /net/ipv4/devinet.c | |
parent | a0ee7c70b22f78593957f99faa06acb4747b8bc0 (diff) | |
download | op-kernel-dev-0da974f4f303a6842516b764507e3c0a03f41e5a.zip op-kernel-dev-0da974f4f303a6842516b764507e3c0a03f41e5a.tar.gz |
[NET]: Conversions from kmalloc+memset to k(z|c)alloc.
Signed-off-by: Panagiotis Issaris <takis@issaris.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/devinet.c')
-rw-r--r-- | net/ipv4/devinet.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index a7c65e9..a6cc31d 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c @@ -93,10 +93,9 @@ static void devinet_sysctl_unregister(struct ipv4_devconf *p); static struct in_ifaddr *inet_alloc_ifa(void) { - struct in_ifaddr *ifa = kmalloc(sizeof(*ifa), GFP_KERNEL); + struct in_ifaddr *ifa = kzalloc(sizeof(*ifa), GFP_KERNEL); if (ifa) { - memset(ifa, 0, sizeof(*ifa)); INIT_RCU_HEAD(&ifa->rcu_head); } @@ -140,10 +139,9 @@ struct in_device *inetdev_init(struct net_device *dev) ASSERT_RTNL(); - in_dev = kmalloc(sizeof(*in_dev), GFP_KERNEL); + in_dev = kzalloc(sizeof(*in_dev), GFP_KERNEL); if (!in_dev) goto out; - memset(in_dev, 0, sizeof(*in_dev)); INIT_RCU_HEAD(&in_dev->rcu_head); memcpy(&in_dev->cnf, &ipv4_devconf_dflt, sizeof(in_dev->cnf)); in_dev->cnf.sysctl = NULL; |