]> Kevux Git Server - fll/commitdiff
Cleanup: Relocate assignment in the if condition to avoid warning.
authorKevin Day <thekevinday@gmail.com>
Thu, 7 Sep 2023 02:05:32 +0000 (21:05 -0500)
committerKevin Day <thekevinday@gmail.com>
Thu, 7 Sep 2023 02:05:32 +0000 (21:05 -0500)
I think I was experiment with this style anyway.

Just move the assignment outside of the if condition.

level_1/fl_fss/c/fss/embedded_list.c
level_1/fl_fss/c/fss/extended_list.c

index ce7c4e56bf19ad541f12a90246db2b5246bbbc8c..dd241308ecbd5cc56a82b8cf602ae7eaa4e9fac2 100644 (file)
@@ -1415,7 +1415,9 @@ extern "C" {
         status = f_fss_is_space(state, object, *range);
         if (F_status_is_error(status)) break;
 
-        if (ends_on_space = (status == F_true)) {
+        ends_on_space = (status == F_true);
+
+        if (ends_on_space) {
           if (object.string[range->start] == f_fss_eol_s.string[0]) {
             status = F_status_set_error(F_none_eol);
 
index 537657768592182c89fb19d7ef5f0fa702c6718b..3860df28761bc69b04887dd4edc12d9ca98cdad5 100644 (file)
@@ -976,7 +976,9 @@ extern "C" {
         status = f_fss_is_space(state, object, *range);
         if (F_status_is_error(status)) break;
 
-        if (ends_on_space = (status == F_true)) {
+        ends_on_space = (status == F_true);
+
+        if (ends_on_space) {
           if (object.string[range->start] == f_fss_eol_s.string[0]) {
             status = F_status_set_error(F_none_eol);