]> Kevux Git Server - fll/commitdiff
Cleanup: Simplify logic at wrap up in f_console_parameter_process().
authorKevin Day <kevin@kevux.org>
Sat, 21 Jan 2023 04:14:21 +0000 (22:14 -0600)
committerKevin Day <kevin@kevux.org>
Sat, 21 Jan 2023 04:14:21 +0000 (22:14 -0600)
level_0/f_console/c/console.c

index 3545840041bd70b864cc1f37744ffcfe54535e6d..d29a50867664826e06cd438d29a84b71466054ea 100644 (file)
@@ -399,17 +399,8 @@ extern "C" {
       parameters->arguments.array[parameters->arguments.used++].size = 0;
     } // for
 
-    if (F_status_is_error(status)) {
-      f_array_lengths_resize(0, &needs_value);
-
-      return status;
-    }
-
-    if (needs_value.used) {
-      status = F_complete_not;
-    }
-    else {
-      status = F_none;
+    if (F_status_is_error_not(status)) {
+      status = needs_value.used ? F_complete_not : F_none;
     }
 
     f_array_lengths_resize(0, &needs_value);