if (!newBinNode) BUG(); 
BUG_ON(!newBinNode); 
static struct tnode *halve(struct trie *t, struct tnode *tn, int *err){	struct tnode *oldtnode = tn;	struct node *left, *right;	int i;	int olen = tnode_child_length(tn);	if (trie_debug) printk("In halve\n");	tn = tnode_new(oldtnode->key, oldtnode->pos, oldtnode->bits - 1);	if (!tn) {		*err = -ENOMEM;		return oldtnode;	}	/*	 * Preallocate and store tnodes before the actual work so we	 * don't get into an inconsistent state if memory allocation	 * fails. In case of failure we return the oldnode and halve	 * of tnode is ignored.	 */	for(i = 0; i < olen; i += 2) {		left = tnode_get_child(oldtnode, i);		right = tnode_get_child(oldtnode, i+1);		/* Two nonempty children */		if (left && right)  {			struct tnode *newBinNode =				tnode_new(left->key, tn->pos + tn->bits, 1);			if (!newBinNode) {				*err = -ENOMEM;				break;			}			put_child(t, tn, i/2, (struct node *)newBinNode);		}	}	if (*err) {		int size = tnode_child_length(tn);		int j;		for(j = 0; j < size; j++)			if (tn->child[j])				tnode_free((struct tnode *)tn->child[j]);		tnode_free(tn);			*err = -ENOMEM;		return oldtnode;	}	for(i = 0; i < olen; i += 2) {		left = tnode_get_child(oldtnode, i);		right = tnode_get_child(oldtnode, i+1);		/* At least one of the children is empty */		if (left == NULL) {			if (right == NULL)    /* Both are empty */				continue;			put_child(t, tn, i/2, right);		} else if (right == NULL)			put_child(t, tn, i/2, left);		/* Two nonempty children */		else {			struct tnode *newBinNode =				(struct tnode *) tnode_get_child(tn, i/2);			put_child(t, tn, i/2, NULL);			if (!newBinNode)				BUG();			put_child(t, newBinNode, 0, left);			put_child(t, newBinNode, 1, right);			put_child(t, tn, i/2, resize(t, newBinNode));		}	}	tnode_free(oldtnode);	return tn;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/91b9a277fc4d207249e459a455abf804ebb5499d/fib_trie.c/buggy/net/ipv4/fib_trie.c