]> sourceware.org Git - newlib-cygwin.git/commit
sys/tree.h: Simplify loop condition
authorSebastian Huber <sebastian.huber@embedded-brains.de>
Tue, 5 Oct 2021 13:31:22 +0000 (15:31 +0200)
committerSebastian Huber <sebastian.huber@embedded-brains.de>
Tue, 5 Oct 2021 14:09:11 +0000 (16:09 +0200)
commit098cf0f98dbb310c6a7ef94f0bdaf683f276767b
treeb66e931452b9e63e15eda2a31c3a0cf9358f8f8d
parent6c1f49f83fde855c9fc428c201b3e739ca2d187f
sys/tree.h: Simplify loop condition

We have

  #define RB_ISRED(elm, field) \
    ((elm) != NULL && RB_COLOR(elm, field) == RB_RED)

So, the RB_ISRED() contains an implicit check for NULL.  In
RB_GENERATE_REMOVE_COLOR() the "elm" pointer cannot be NULL in the while
condition.  Use RB_COLOR(elm) == RB_BLACK instead.
newlib/libc/include/sys/tree.h
This page took 0.02552 seconds and 5 git commands to generate.