coding guidelines: comply with MISRA Rule 13.4 - avoid to use assignment expression value Signed-off-by: Hess Nathan <nhess@baumer.com>
diff --git a/lib/os/cbprintf_complete.c b/lib/os/cbprintf_complete.c index 08779d1..fe95fab 100644 --- a/lib/os/cbprintf_complete.c +++ b/lib/os/cbprintf_complete.c
@@ -1060,7 +1060,7 @@ /* Fraction is subnormal. Normalize it and correct * the exponent. */ - while (((fract <<= 1) & BIT_63) == 0) { + for (fract <<= 1; (fract & BIT_63) == 0; fract <<= 1) { expo--; } }
diff --git a/lib/utils/rb.c b/lib/utils/rb.c index dc4bc06..5457224 100644 --- a/lib/utils/rb.c +++ b/lib/utils/rb.c
@@ -537,7 +537,7 @@ f->stack[f->top] = n; f->is_left[f->top] = 0U; - while ((n = get_child(n, 0U)) != NULL) { + for (n = get_child(n, 0U); n != NULL; n = get_child(n, 0U)) { f->top++; f->stack[f->top] = n; f->is_left[f->top] = 1;