]> Kevux Git Server - fll/commitdiff
Cleanup: Remove unnecessary status checks in fl_directory_do(). development
authorKevin Day <Kevin@kevux.org>
Fri, 4 Apr 2025 00:51:41 +0000 (19:51 -0500)
committerKevin Day <Kevin@kevux.org>
Fri, 4 Apr 2025 00:51:43 +0000 (19:51 -0500)
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

index 115a3930004d88c088b1ebbacc43d562ffa61f68..659bbc0fc6aa876d6cd618c843a5f2b4e1b04cf8 100644 (file)
@@ -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;
               }
             }
           }