Redo minor cleanup in new_rbtree

This commit is contained in:
condret 2022-04-23 02:36:51 +02:00
parent dfeb6b0403
commit 1418971085

View File

@ -138,9 +138,9 @@ R_API bool r_crbtree_insert(RRBTree *tree, void *data, RRBComparator cmp, void *
r_return_val_if_fail (tree && data && cmp, false);
bool inserted = false;
if (tree->root == NULL) {
if (!tree->root) {
tree->root = _node_new (data, NULL);
if (tree->root == NULL) {
if (!tree->root) {
return false;
}
inserted = true;