From 5f48e8c6fd409ff1cd94f42a762025872ec0e22b Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Thu, 3 Apr 2025 19:51:41 -0500 Subject: [PATCH] Cleanup: Remove unnecessary status checks in fl_directory_do(). These checks are performed later on in the code at the end of the loop without additional status changes in between. --- level_1/fl_directory/c/private-directory.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/level_1/fl_directory/c/private-directory.c b/level_1/fl_directory/c/private-directory.c index 115a393..659bbc0 100644 --- a/level_1/fl_directory/c/private-directory.c +++ b/level_1/fl_directory/c/private-directory.c @@ -198,16 +198,12 @@ extern "C" { private_fl_directory_do_recurse(recurse); --recurse->depth; - - if (F_status_is_error(recurse->state.status)) break; } else { - recurse->action(recurse, recurse->listing.directory.array[i], f_directory_recurse_do_flag_directory_e); if (F_status_is_error(recurse->state.status)) { private_inline_fl_directory_do_handle(recurse, recurse->listing.directory.array[i], f_directory_recurse_do_flag_directory_e); - if (F_status_is_error(recurse->state.status)) break; } } @@ -220,7 +216,6 @@ extern "C" { if (F_status_is_error(recurse->state.status)) { private_inline_fl_directory_do_handle(recurse, recurse->listing.directory.array[i], flag_actions[j] | f_directory_recurse_do_flag_directory_e); - if (F_status_is_error(recurse->state.status)) break; } } } -- 1.8.3.1