diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-10-05 15:39:10 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-10-05 16:09:50 +0200 |
commit | ee30f991c38851f1bfbbf72d19c5c6ee1b97f32a (patch) | |
tree | 7b6d2f6cd7c651653443ed42311d5470dd3c3ad1 /newlib/libc/include | |
parent | 098cf0f98dbb310c6a7ef94f0bdaf683f276767b (diff) | |
download | newlib-ee30f991c38851f1bfbbf72d19c5c6ee1b97f32a.zip newlib-ee30f991c38851f1bfbbf72d19c5c6ee1b97f32a.tar.gz newlib-ee30f991c38851f1bfbbf72d19c5c6ee1b97f32a.tar.bz2 |
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 {
...
}
Diffstat (limited to 'newlib/libc/include')
-rw-r--r-- | newlib/libc/include/sys/tree.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/newlib/libc/include/sys/tree.h b/newlib/libc/include/sys/tree.h index 15831c7..180809e 100644 --- a/newlib/libc/include/sys/tree.h +++ b/newlib/libc/include/sys/tree.h @@ -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); \ |