[Bug 280618] sys/sys/tree.h: The RB_GENERATE_INSERT_COLOR macro is weird.

From: <bugzilla-noreply_at_freebsd.org>
Date: Sun, 04 Aug 2024 21:19:53 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=280618

            Bug ID: 280618
           Summary: sys/sys/tree.h: The RB_GENERATE_INSERT_COLOR macro is
                    weird.
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: misc
          Assignee: bugs@FreeBSD.org
          Reporter: hodong@nimfsoft.art

There seems to be a problem with the RB_GENERATE_INSERT_COLOR macro.

        do {                                                            \
                ...
                return (child);                                         \
        } while ((parent = gpar) != NULL);                              \

There is a "return" at the end of the "do ... while" loop, so "while ((parent =
gpar) != NULL);" is not evaluated.

-- 
You are receiving this mail because:
You are the assignee for the bug.