From 6e4a6ab4b10f0ff4f746e242e37b19f7c447678e Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 17 Sep 2015 10:21:29 +0200 Subject: [PATCH] (libretrodb) Cleanup --- libretro-db/libretrodb.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/libretro-db/libretrodb.c b/libretro-db/libretrodb.c index f416e6c6fb..e636444aa9 100644 --- a/libretro-db/libretrodb.c +++ b/libretro-db/libretrodb.c @@ -450,13 +450,7 @@ int libretrodb_create_index(libretrodb_t *db, uint64_t item_loc = libretrodb_tell(db); bintree_t *tree = bintree_new(node_compare, &field_size); - if (!tree) - { - rv = -1; - goto clean; - } - - if (libretrodb_cursor_open(db, &cur, NULL) != 0) + if (!tree || (libretrodb_cursor_open(db, &cur, NULL) != 0)) { rv = -1; goto clean;