提交 918854a6 编写于 作者: C Cong Ding 提交者: Linus Torvalds

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: NCong Ding <dinggnu@gmail.com>
Cc: Michel Lespinasse <walken@google.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 22b361d1
...@@ -118,7 +118,7 @@ static void check(int nr_nodes) ...@@ -118,7 +118,7 @@ static void check(int nr_nodes)
{ {
struct rb_node *rb; struct rb_node *rb;
int count = 0; int count = 0;
int blacks; int blacks = 0;
u32 prev_key = 0; u32 prev_key = 0;
for (rb = rb_first(&root); rb; rb = rb_next(rb)) { for (rb = rb_first(&root); rb; rb = rb_next(rb)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册