Skip to content

Commit fe06ffb

Browse files
DeHessnashif
authored andcommitted
coding guidelines: comply with MISRA Rule 13.4
- avoid to use assignment expression value Signed-off-by: Hess Nathan <[email protected]>
1 parent 680fa15 commit fe06ffb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/os/cbprintf_complete.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1060,7 +1060,7 @@ static char *encode_float(double value,
10601060
/* Fraction is subnormal. Normalize it and correct
10611061
* the exponent.
10621062
*/
1063-
while (((fract <<= 1) & BIT_63) == 0) {
1063+
for (fract <<= 1; (fract & BIT_63) == 0; fract <<= 1) {
10641064
expo--;
10651065
}
10661066
}

lib/utils/rb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ static inline struct rbnode *stack_left_limb(struct rbnode *n,
537537
f->stack[f->top] = n;
538538
f->is_left[f->top] = 0U;
539539

540-
while ((n = get_child(n, 0U)) != NULL) {
540+
for (n = get_child(n, 0U); n != NULL; n = get_child(n, 0U)) {
541541
f->top++;
542542
f->stack[f->top] = n;
543543
f->is_left[f->top] = 1;

0 commit comments

Comments
 (0)