From 97895098a676a7264ec726c0652d49c3e91593f6 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Fri, 7 Jun 2024 23:21:11 -0500 Subject: [PATCH] Cleanup: Improve if condition logic in Controller entry file. The code has some unnecessary conditions. Remove these. Use greater than rather than multiple equals. --- level_3/controller/c/entry/private-entry.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); -- 1.8.3.1