]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
rbtree/test: move rb_node to the middle of the test struct
authorCody P Schafer <cody@linux.vnet.ibm.com>
Fri, 3 Jan 2014 03:10:33 +0000 (14:10 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 3 Jan 2014 03:10:33 +0000 (14:10 +1100)
Avoid making the rb_node the first entry to catch some bugs around NULL
checking the rb_node.

Signed-off-by: Cody P Schafer <cody@linux.vnet.ibm.com>
Cc: Michel Lespinasse <walken@google.com>
Cc: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
lib/rbtree_test.c

index 31dd4ccd3baae800a4459088cca01ca560c3a536..df6c125ff5c21b149cee4bf397dab1608247f6fc 100644 (file)
@@ -8,8 +8,8 @@
 #define CHECK_LOOPS 100
 
 struct test_node {
-       struct rb_node rb;
        u32 key;
+       struct rb_node rb;
 
        /* following fields used for testing augmented rbtree functionality */
        u32 val;