sys/tree.h: Simplify chain of conditions
In RB_GENERATE_REMOVE_COLOR() simplify a chain of conditions of the following pattern if (x) { ... } else if (!x) { ... } to if (x) { ... } else { ... }
This commit is contained in:
parent
098cf0f98d
commit
ee30f991c3
|
@ -528,7 +528,7 @@ name##_RB_REMOVE_COLOR(struct name *head, struct type *parent) \
|
|||
RB_ROTATE_LEFT(head, tmp, oright, field); \
|
||||
RB_COLOR(oright, field) = RB_BLACK; \
|
||||
tmp = oright; \
|
||||
} else if (!RB_ISRED(RB_LEFT(tmp, field), field)) { \
|
||||
} else { \
|
||||
RB_COLOR(tmp, field) = RB_RED; \
|
||||
elm = parent; \
|
||||
parent = RB_PARENT(elm, field); \
|
||||
|
|
Loading…
Reference in New Issue