From 5555d18a5241de3227af43f2dc68d05b28b5fe74 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 17 May 2016 14:24:43 +0200 Subject: [PATCH] Cleanup --- tasks/task_database.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/tasks/task_database.c b/tasks/task_database.c index c92358bca3..1bb9b55212 100644 --- a/tasks/task_database.c +++ b/tasks/task_database.c @@ -406,12 +406,10 @@ static int task_database_iterate_crc_lookup( if (db_state->entry_index >= db_state->info->count) return database_info_list_iterate_next(db_state); + /* If we haven't reached the end of the database list yet, + * continue iterating. */ if (db_state->list_index < db_state->list->size) - { - /* Didn't reach the end of the database list yet, - * continue iterating. */ return 1; - } if (db_state->info) database_info_list_free(db_state->info); @@ -485,12 +483,10 @@ static int task_database_iterate_serial_lookup( if (db_state->entry_index >= db_state->info->count) return database_info_list_iterate_next(db_state); + /* If we haven't reached the end of the database list yet, + * continue iterating. */ if (db_state->list_index < db_state->list->size) - { - /* Didn't reach the end of the database list yet, - * continue iterating. */ return 1; - } if (db_state->info) database_info_list_free(db_state->info);