From: Kevin Day Date: Sat, 8 Jun 2024 04:21:11 +0000 (-0500) Subject: Cleanup: Improve if condition logic in Controller entry file. X-Git-Tag: 0.6.11~49 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=97895098a676a7264ec726c0652d49c3e91593f6;p=fll Cleanup: Improve if condition logic in Controller entry file. The code has some unnecessary conditions. Remove these. Use greater than rather than multiple equals. --- diff --git a/level_3/controller/c/entry/private-entry.c b/level_3/controller/c/entry/private-entry.c index c1cf331..6e94494 100644 --- a/level_3/controller/c/entry/private-entry.c +++ b/level_3/controller/c/entry/private-entry.c @@ -1154,7 +1154,7 @@ extern "C" { f_thread_unlock(&global->thread->lock.rule); - if (global->main->parameters.array[controller_parameter_simulate_e].result == f_console_result_found_e || global->main->error.verbosity == f_console_verbosity_verbose_e || global->main->error.verbosity == f_console_verbosity_debug_e || (entry->show == controller_entry_show_init_e && entry_action->type != controller_entry_action_type_consider_e)) { + if (global->main->parameters.array[controller_parameter_simulate_e].result == f_console_result_found_e || global->main->error.verbosity > f_console_verbosity_normal_e || (entry->show == controller_entry_show_init_e && entry_action->type != controller_entry_action_type_consider_e)) { if (global->main->output.verbosity != f_console_verbosity_quiet_e && global->main->error.verbosity != f_console_verbosity_error_e) { controller_lock_print(global->main->output.to, global->thread); @@ -1503,7 +1503,7 @@ extern "C" { } } - if ((global->main->parameters.array[controller_parameter_simulate_e].result == f_console_result_found_e && global->main->error.verbosity != f_console_verbosity_quiet_e) && global->main->error.verbosity != f_console_verbosity_error_e || global->main->error.verbosity == f_console_verbosity_verbose_e) { + if ((global->main->parameters.array[controller_parameter_simulate_e].result == f_console_result_found_e && global->main->error.verbosity > f_console_verbosity_error_e) || global->main->error.verbosity > f_console_verbosity_normal_e) { controller_lock_print(global->main->output.to, global->thread); fl_print_format("%rDone processing %r item '", global->main->output.to.stream, f_string_eol_s, is_entry ? controller_entry_s : controller_exit_s);