Skip to content

Commit

Permalink
child is set in previous loop (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
epsilon-0 authored Dec 29, 2023
1 parent 52fcab6 commit 391d40d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/tree.h
Original file line number Diff line number Diff line change
Expand Up @@ -360,14 +360,14 @@ name##_RB_INSERT_BALANCE(struct name *head, struct type *parent, \
if (_RB_GET_RDIFF(parent, sibdir, field)) { \
/* case (2.1) */ \
(void)_RB_AUGMENT(elm); \
child = elm; \
elm = parent; \
continue; \
} \
_RB_SET_RDIFF0(elm, elmdir, field); \
/* case (2.2) */ \
if (_RB_GET_RDIFF(elm, sibdir, field) == 0) { \
/* case (2.2b) */ \
child = _RB_PTR(_RB_GET_CHILD(elm, sibdir, field)); \
_RB_ROTATE(elm, child, elmdir, field); \
} else { \
/* case (2.2a) */ \
Expand Down

0 comments on commit 391d40d

Please sign in to comment.