From 9f297f5f7cc5fbb1f80568e447cca6cf6eb7d5a6 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 19 May 2019 05:50:28 +0200 Subject: [PATCH] Cleanups --- libretro-common/lists/file_list.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/libretro-common/lists/file_list.c b/libretro-common/lists/file_list.c index 94a9d37b20..5b329823ec 100644 --- a/libretro-common/lists/file_list.c +++ b/libretro-common/lists/file_list.c @@ -39,15 +39,15 @@ bool file_list_reserve(file_list_t *list, size_t nitems) new_data = (struct item_file*)realloc(list->list, nitems * item_size); - if (new_data) - { - memset(&new_data[list->capacity], 0, item_size * (nitems - list->capacity)); + if (!new_data) + return false; - list->list = new_data; - list->capacity = nitems; - } + memset(&new_data[list->capacity], 0, item_size * (nitems - list->capacity)); - return new_data != NULL; + list->list = new_data; + list->capacity = nitems; + + return true; } bool file_list_prepend(file_list_t *list,