]> Kevux Git Server - fll/commitdiff
Cleanup: Code structure for fake.
authorKevin Day <thekevinday@gmail.com>
Fri, 8 Apr 2022 01:13:39 +0000 (20:13 -0500)
committerKevin Day <thekevinday@gmail.com>
Fri, 8 Apr 2022 01:13:39 +0000 (20:13 -0500)
level_3/fake/c/private-fake.c
level_3/fake/c/private-make-load_fakefile.c
level_3/fake/c/private-make.c

index 442484a769575eb4646ee1cdeb44ac285a0a9557..9b4fb88c4433a766ca8e65e32c4d59212dcd3955 100644 (file)
@@ -199,7 +199,8 @@ extern "C" {
 
           return F_status_set_error(F_parameter);
         }
-        else if (data->main->parameters.array[parameters_id[i]].result == f_console_result_additional_e) {
+
+        if (data->main->parameters.array[parameters_id[i]].result == f_console_result_additional_e) {
           if (data->main->parameters.array[parameters_id[i]].locations.used > 1) {
             fake_print_error_parameter_too_many(data, parameters_name[i]);
 
@@ -279,9 +280,8 @@ extern "C" {
 
               return status;
             }
-            else {
-              status = F_none;
-            }
+
+            status = F_none;
           }
 
           if (!data->main->parameters.arguments.array[index].used || status == F_data_not) {
@@ -356,7 +356,8 @@ extern "C" {
 
           return F_status_set_error(F_parameter);
         }
-        else if (data->main->parameters.array[parameters_id[i]].result == f_console_result_additional_e) {
+
+        if (data->main->parameters.array[parameters_id[i]].result == f_console_result_additional_e) {
           if (data->main->parameters.array[parameters_id[i]].values.used > 1) {
             fake_print_error_parameter_too_many(data, parameters_name[i]);
 
@@ -444,7 +445,8 @@ extern "C" {
 
       return F_status_set_error(F_parameter);
     }
-    else if (data->main->parameters.array[fake_parameter_mode_e].result == f_console_result_additional_e) {
+
+    if (data->main->parameters.array[fake_parameter_mode_e].result == f_console_result_additional_e) {
       status = fll_program_parameter_additional_rip(data->main->parameters.arguments.array, data->main->parameters.array[fake_parameter_mode_e].values, &data->mode);
 
       if (F_status_is_error(status)) {
index 9a12fc0ecea7170d5eec1c7c1414d79e804c4a45..69a802b7efed51601d69879f29382c009dc59a1c 100644 (file)
@@ -152,7 +152,8 @@ extern "C" {
 
             continue;
           }
-          else if (fl_string_dynamic_partial_compare_string(fake_make_section_main_s.string, data_make->buffer, fake_make_section_main_s.used, list_objects.array[i]) == F_equal_to) {
+
+          if (fl_string_dynamic_partial_compare_string(fake_make_section_main_s.string, data_make->buffer, fake_make_section_main_s.used, list_objects.array[i]) == F_equal_to) {
             if (!missing_main) {
               fake_print_warning_settings_object_multiple(data_make->data, data_make->data->file_data_build_fakefile, fake_common_setting_list_s, fake_make_section_main_s);
 
index 5df2e2d5767f2b4849cfa9a20e4df925045404fd..71255c89dc2d0fc11bc254bd7b47a002a2e75f45 100644 (file)
@@ -65,7 +65,8 @@ extern "C" {
 
           return F_status_set_error(status);
         }
-        else if (status == F_exist_not) {
+
+        if (status == F_exist_not) {
           if (data->main->error.verbosity != f_console_verbosity_quiet_e) {
             flockfile(data->main->error.to.stream);
 
@@ -83,9 +84,11 @@ extern "C" {
       }
 
       fll_error_print(print, F_status_set_fine(status), "fl_conversion_dynamic_to_number_unsigned", F_true);
+
       return F_status_set_error(status);
     }
-    else if (number > F_type_size_32_unsigned_d) {
+
+    if (number > F_type_size_32_unsigned_d) {
       if (data->main->error.verbosity != f_console_verbosity_quiet_e) {
         flockfile(data->main->error.to.stream);
 
@@ -98,6 +101,7 @@ extern "C" {
     }
 
     *id = (gid_t) number;
+
     return status;
   }
 #endif // _di_fake_make_get_id_group_
@@ -154,7 +158,8 @@ extern "C" {
 
           return F_status_set_error(status);
         }
-        else if (status == F_exist_not) {
+
+        if (status == F_exist_not) {
           if (data->main->error.verbosity != f_console_verbosity_quiet_e) {
             flockfile(data->main->error.to.stream);
 
@@ -172,9 +177,11 @@ extern "C" {
       }
 
       fll_error_print(print, status, "fl_conversion_dynamic_to_number_unsigned", F_true);
+
       return F_status_set_error(status);
     }
-    else if (number > F_type_size_32_unsigned_d) {
+
+    if (number > F_type_size_32_unsigned_d) {
       if (data->main->error.verbosity != f_console_verbosity_quiet_e) {
         flockfile(data->main->error.to.stream);
 
@@ -187,6 +194,7 @@ extern "C" {
     }
 
     *id = (uid_t) number;
+
     return status;
   }
 #endif // _di_fake_make_get_id_owner_