HomeFreeBSD

For the case when RB_REMOVE requires a nontrivial search to find the

Description

For the case when RB_REMOVE requires a nontrivial search to find the
node to replace the one being removed, restructure to first remove the
replacement node and correct the parent pointers around it, and then
let the all-cases code at the end deal with the parent of the deleted
node, making it point to the replacement node. This removes one or two
conditional branches.

Reviewed by: markj
Tested by: pho
Differential Revision: https://reviews.freebsd.org/D24845

Details

Provenance
dougmAuthored on
Reviewer
markj
Differential Revision
D24845: Reorder manipulations in RB_REMOVE
Parents
rS361323: Tag unbound 1.10.1.
Branches
Unknown
Tags
Unknown