From: Kevin Day Date: Thu, 7 Sep 2023 02:05:32 +0000 (-0500) Subject: Cleanup: Relocate assignment in the if condition to avoid warning. X-Git-Tag: 0.6.7~2 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=83bb1485c07209aac6152622da3cbbccf463b751;p=fll Cleanup: Relocate assignment in the if condition to avoid warning. I think I was experiment with this style anyway. Just move the assignment outside of the if condition. --- diff --git a/level_1/fl_fss/c/fss/embedded_list.c b/level_1/fl_fss/c/fss/embedded_list.c index ce7c4e5..dd24130 100644 --- a/level_1/fl_fss/c/fss/embedded_list.c +++ b/level_1/fl_fss/c/fss/embedded_list.c @@ -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); diff --git a/level_1/fl_fss/c/fss/extended_list.c b/level_1/fl_fss/c/fss/extended_list.c index 5376577..3860df2 100644 --- a/level_1/fl_fss/c/fss/extended_list.c +++ b/level_1/fl_fss/c/fss/extended_list.c @@ -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);