Skip to contentSkip to conversation

: removes a memset() call in tnode_new()

FIB Applied Eric Dumazet 2 participants 2 messages Jan 13, 2008

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

tnode_alloc() already clears allocated memory, using kcalloc() or alloc_pages(GFP_KERNEL|__GFP_ZERO, ...)

net/ipv4/fib_trie.c +0 -1
index a418498..f26ba31 100644
@@ -391,7 +391,6 @@ static struct tnode* tnode_new(t_key key, int pos, int bits)
 	struct tnode *tn = tnode_alloc(sz);
 
 	if (tn) {
-		memset(tn, 0, sz);
 		tn->parent = T_TNODE;
 		tn->pos = pos;
 		tn->bits = bits;