From: Kevin Day Date: Mon, 15 Jun 2020 05:00:29 +0000 (-0500) Subject: Cleanup: use the not status macro instead of the status macro with ! X-Git-Tag: 0.5.0~156 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=d9e2d7618fd9cf4db46f509a1417f18cc396917a;p=fll Cleanup: use the not status macro instead of the status macro with ! --- diff --git a/level_0/f_directory/c/directory_type.h b/level_0/f_directory/c/directory_type.h index 458d852..8ab075a 100644 --- a/level_0/f_directory/c/directory_type.h +++ b/level_0/f_directory/c/directory_type.h @@ -50,23 +50,23 @@ extern "C" { #define f_macro_directory_listing_delete(status, listing) \ f_macro_string_dynamics_delete(status, listing.block) \ - if (!F_status_is_error(status)) f_macro_string_dynamics_delete(status, listing.character) \ - if (!F_status_is_error(status)) f_macro_string_dynamics_delete(status, listing.directory) \ - if (!F_status_is_error(status)) f_macro_string_dynamics_delete(status, listing.regular) \ - if (!F_status_is_error(status)) f_macro_string_dynamics_delete(status, listing.link) \ - if (!F_status_is_error(status)) f_macro_string_dynamics_delete(status, listing.fifo) \ - if (!F_status_is_error(status)) f_macro_string_dynamics_delete(status, listing.socket) \ - if (!F_status_is_error(status)) f_macro_string_dynamics_delete(status, listing.unknown) + if (F_status_is_not_error(status)) f_macro_string_dynamics_delete(status, listing.character) \ + if (F_status_is_not_error(status)) f_macro_string_dynamics_delete(status, listing.directory) \ + if (F_status_is_not_error(status)) f_macro_string_dynamics_delete(status, listing.regular) \ + if (F_status_is_not_error(status)) f_macro_string_dynamics_delete(status, listing.link) \ + if (F_status_is_not_error(status)) f_macro_string_dynamics_delete(status, listing.fifo) \ + if (F_status_is_not_error(status)) f_macro_string_dynamics_delete(status, listing.socket) \ + if (F_status_is_not_error(status)) f_macro_string_dynamics_delete(status, listing.unknown) #define f_macro_directory_listing_destroy(status, listing) \ f_macro_string_dynamics_destroy(status, listing.block) \ - if (!F_status_is_error(status)) f_macro_string_dynamics_destroy(status, listing.character) \ - if (!F_status_is_error(status)) f_macro_string_dynamics_destroy(status, listing.directory) \ - if (!F_status_is_error(status)) f_macro_string_dynamics_destroy(status, listing.regular) \ - if (!F_status_is_error(status)) f_macro_string_dynamics_destroy(status, listing.link) \ - if (!F_status_is_error(status)) f_macro_string_dynamics_destroy(status, listing.fifo) \ - if (!F_status_is_error(status)) f_macro_string_dynamics_destroy(status, listing.socket) \ - if (!F_status_is_error(status)) f_macro_string_dynamics_delete(status, listing.unknown) + if (F_status_is_not_error(status)) f_macro_string_dynamics_destroy(status, listing.character) \ + if (F_status_is_not_error(status)) f_macro_string_dynamics_destroy(status, listing.directory) \ + if (F_status_is_not_error(status)) f_macro_string_dynamics_destroy(status, listing.regular) \ + if (F_status_is_not_error(status)) f_macro_string_dynamics_destroy(status, listing.link) \ + if (F_status_is_not_error(status)) f_macro_string_dynamics_destroy(status, listing.fifo) \ + if (F_status_is_not_error(status)) f_macro_string_dynamics_destroy(status, listing.socket) \ + if (F_status_is_not_error(status)) f_macro_string_dynamics_delete(status, listing.unknown) #define f_macro_directory_listing_delete_simple(listing) \ f_macro_string_dynamics_delete_simple(listing.block) \ diff --git a/level_2/fll_execute/c/execute.c b/level_2/fll_execute/c/execute.c index e2579d3..496682c 100644 --- a/level_2/fll_execute/c/execute.c +++ b/level_2/fll_execute/c/execute.c @@ -604,11 +604,11 @@ extern "C" { for (i = 0; i < paths.used; i++) { status = fl_string_append(program_name, program_name_length, &paths.array[i]); - if (!F_status_is_error(status)) { + if (F_status_is_not_error(status)) { status = fl_string_dynamic_terminate(&paths.array[i]); } - if (!F_status_is_error(status)) { + if (F_status_is_not_error(status)) { status = f_file_exists(paths.array[i].string); if (status == F_true) {