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:
Sebastian Huber 2021-10-05 15:39:10 +02:00
parent 098cf0f98d
commit ee30f991c3
1 changed files with 1 additions and 1 deletions

View File

@ -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); \