]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] remove unneeded test from radix_tree_extend()
authorAndrew Morton <akpm@digeo.com>
Mon, 10 Feb 2003 15:36:39 +0000 (07:36 -0800)
committerLinus Torvalds <torvalds@home.transmeta.com>
Mon, 10 Feb 2003 15:36:39 +0000 (07:36 -0800)
Patch from: Szabolcs Berecz <szabi@mplayerhq.hu>

No need to check root->rnode in the loop. In the loop it remains nonzero.

lib/radix-tree.c

index dc20f8513946c193eae540155f8cadcb13b7203f..e1973ed79a7a127962c82b64482c03c3d432026d 100644 (file)
@@ -154,8 +154,7 @@ static int radix_tree_extend(struct radix_tree_root *root, unsigned long index)
 
                        /* Increase the height.  */
                        node->slots[0] = root->rnode;
-                       if (root->rnode)
-                               node->count = 1;
+                       node->count = 1;
                        root->rnode = node;
                        root->height++;
                } while (height > root->height);