Skip to content

Commit

Permalink
lib/rbtree_test.c: fix uninitialized variable warning
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Cong Ding authored and Linus Torvalds committed Dec 18, 2012
1 parent 22b361d commit 918854a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rbtree_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ static void check(int nr_nodes)
{
struct rb_node *rb;
int count = 0;
int blacks;
int blacks = 0;
u32 prev_key = 0;

for (rb = rb_first(&root); rb; rb = rb_next(rb)) {
Expand Down

0 comments on commit 918854a

Please sign in to comment.