diff options
author | Cong Ding <dinggnu@gmail.com> | 2012-12-17 19:01:43 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-17 20:15:18 -0500 |
commit | 918854a65e856574523d94763ef2a2b48ad55a25 (patch) | |
tree | d193a1f4a7075c521160009b0c96815824537f2b /lib | |
parent | 22b361d1df7bc25b558e52f22e779286a3d323e4 (diff) |
lib/rbtree_test.c: fix uninitialized variable warning
Fix this warning:
lib/rbtree_test.c: In function `check':
lib/rbtree_test.c:121: warning: `blacks' may be used uninitialized in this function
Signed-off-by: Cong Ding <dinggnu@gmail.com>
Cc: Michel Lespinasse <walken@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rbtree_test.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rbtree_test.c b/lib/rbtree_test.c index 268b23951fec..d7f491a54579 100644 --- a/lib/rbtree_test.c +++ b/lib/rbtree_test.c | |||
@@ -118,7 +118,7 @@ static void check(int nr_nodes) | |||
118 | { | 118 | { |
119 | struct rb_node *rb; | 119 | struct rb_node *rb; |
120 | int count = 0; | 120 | int count = 0; |
121 | int blacks; | 121 | int blacks = 0; |
122 | u32 prev_key = 0; | 122 | u32 prev_key = 0; |
123 | 123 | ||
124 | for (rb = rb_first(&root); rb; rb = rb_next(rb)) { | 124 | for (rb = rb_first(&root); rb; rb = rb_next(rb)) { |