mirror of
https://github.com/libretro/RetroArch
synced 2025-04-01 13:20:43 +00:00
(libretro-db) Simplify bintree.c
This commit is contained in:
parent
7baa166adc
commit
ffec5bf83d
@ -50,21 +50,6 @@ static int insert(bintree_t *t, struct bintree_node *root, void *value)
|
||||
{
|
||||
root->left = new_nil_node(root);
|
||||
root->right = new_nil_node(root);
|
||||
|
||||
if (!root->left || !root->right)
|
||||
{
|
||||
if (root->left)
|
||||
{
|
||||
free(root->left);
|
||||
root->left = NULL;
|
||||
}
|
||||
if (root->right)
|
||||
{
|
||||
free(root->right);
|
||||
root->right = NULL;
|
||||
}
|
||||
return -ENOMEM;
|
||||
}
|
||||
root->value = value;
|
||||
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user