Commit 16fcfa17 authored by Rashika Kheria's avatar Rashika Kheria Committed by Greg Kroah-Hartman

Staging: lustre: Fix no use of assignment in if condition

This patch fixes the following checkpatch.pl error in lustre/ldlm/interval_tree.c-
ERROR: do not use assignment in if condition
Signed-off-by: default avatarRashika Kheria <rashika.kheria@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b6ea5ef8
...@@ -427,7 +427,8 @@ static void interval_erase_color(struct interval_node *node, ...@@ -427,7 +427,8 @@ static void interval_erase_color(struct interval_node *node,
} else { } else {
if (node_is_black_or_0(tmp->in_right)) { if (node_is_black_or_0(tmp->in_right)) {
struct interval_node *o_left; struct interval_node *o_left;
if ((o_left = tmp->in_left)) o_left = tmp->in_left;
if (o_left)
o_left->in_color = INTERVAL_BLACK; o_left->in_color = INTERVAL_BLACK;
tmp->in_color = INTERVAL_RED; tmp->in_color = INTERVAL_RED;
__rotate_right(tmp, root); __rotate_right(tmp, root);
...@@ -457,7 +458,8 @@ static void interval_erase_color(struct interval_node *node, ...@@ -457,7 +458,8 @@ static void interval_erase_color(struct interval_node *node,
} else { } else {
if (node_is_black_or_0(tmp->in_left)) { if (node_is_black_or_0(tmp->in_left)) {
struct interval_node *o_right; struct interval_node *o_right;
if ((o_right = tmp->in_right)) o_right = tmp->in_right;
if (o_right)
o_right->in_color = INTERVAL_BLACK; o_right->in_color = INTERVAL_BLACK;
tmp->in_color = INTERVAL_RED; tmp->in_color = INTERVAL_RED;
__rotate_left(tmp, root); __rotate_left(tmp, root);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment