From: Kevin Day Date: Fri, 4 Apr 2025 00:51:41 +0000 (-0500) Subject: Cleanup: Remove unnecessary status checks in fl_directory_do(). X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;p=fll 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. --- 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; } } }