SIDN / spin

SPIN Core Software
https://spin.sidnlabs.nl
GNU General Public License v2.0
77 stars 9 forks source link

tree_add(): only balance current->parent->right when appropriate #64

Closed cschutijser closed 5 years ago

cschutijser commented 5 years ago

I would appreciate some review on this one. I ran into problems because tree_entry_depth() kept calling itself recursively because current->left == current. This patch fixes this particular problem and I think the diff makes sense but I would like someone to double-check.