Skip to content

Commit bcc6d41

Browse files
Flavio Ceolinnashif
authored andcommitted
random: timer: Comply with MISRA Rule 14.4
Use boolean expression in a controlling expression. Signed-off-by: Flavio Ceolin <[email protected]>
1 parent 36ef3da commit bcc6d41

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

subsys/random/random_timer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ void z_impl_sys_rand_get(void *dst, size_t outlen)
6363
uint32_t blocksize;
6464
uint32_t ret;
6565

66-
while (outlen) {
66+
while (outlen > 0) {
6767
ret = rand32_get();
6868
blocksize = MIN(outlen, sizeof(ret));
6969
(void)memcpy((void *)udst, &ret, blocksize);

0 commit comments

Comments
 (0)