mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-15 11:04:09 +00:00
lib: fix a possible NULL deference
Silences a warning generated by clang.
This commit is contained in:
parent
45926e5874
commit
8f942af902
@ -222,6 +222,10 @@ rbe_remove_color(const struct rb_type *t, struct rb_tree *rbt,
|
|||||||
{
|
{
|
||||||
struct rb_entry *tmp;
|
struct rb_entry *tmp;
|
||||||
|
|
||||||
|
/* Silence clang possible NULL deference warning. */
|
||||||
|
if (parent == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
while ((rbe == NULL || RBE_COLOR(rbe) == RB_BLACK) &&
|
while ((rbe == NULL || RBE_COLOR(rbe) == RB_BLACK) &&
|
||||||
rbe != RBH_ROOT(rbt)) {
|
rbe != RBH_ROOT(rbt)) {
|
||||||
if (RBE_LEFT(parent) == rbe) {
|
if (RBE_LEFT(parent) == rbe) {
|
||||||
|
Loading…
Reference in New Issue
Block a user