summaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2008-12-04 07:27:25 +0100
committerDavid S. Miller <davem@davemloft.net>2008-12-04 07:27:25 +0100
commit36cbac5909d227c4de31fb93e1dd99c839c9cb6f (patch)
treec718f49479bb3de88f50681c0357c1add9e5a989 /net/ipv6
parentif_usb: Kill directly reference of netdev->priv (diff)
downloadlinux-36cbac5909d227c4de31fb93e1dd99c839c9cb6f.tar.xz
linux-36cbac5909d227c4de31fb93e1dd99c839c9cb6f.zip
net/ipv6/ip6mr.c: Use kmem_cache_zalloc, remove memset
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/ip6mr.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c
index 1446bec895a2..d1008e6891e7 100644
--- a/net/ipv6/ip6mr.c
+++ b/net/ipv6/ip6mr.c
@@ -692,20 +692,18 @@ static struct mfc6_cache *ip6mr_cache_find(struct in6_addr *origin, struct in6_a
*/
static struct mfc6_cache *ip6mr_cache_alloc(void)
{
- struct mfc6_cache *c = kmem_cache_alloc(mrt_cachep, GFP_KERNEL);
+ struct mfc6_cache *c = kmem_cache_zalloc(mrt_cachep, GFP_KERNEL);
if (c == NULL)
return NULL;
- memset(c, 0, sizeof(*c));
c->mfc_un.res.minvif = MAXMIFS;
return c;
}
static struct mfc6_cache *ip6mr_cache_alloc_unres(void)
{
- struct mfc6_cache *c = kmem_cache_alloc(mrt_cachep, GFP_ATOMIC);
+ struct mfc6_cache *c = kmem_cache_zalloc(mrt_cachep, GFP_ATOMIC);
if (c == NULL)
return NULL;
- memset(c, 0, sizeof(*c));
skb_queue_head_init(&c->mfc_un.unres.unresolved);
c->mfc_un.unres.expires = jiffies + 10 * HZ;
return c;