Skip to content

Commit

Permalink
crypto/tinyaes: Typecast RAND_MAX to float to fix warning
Browse files Browse the repository at this point in the history
Signed-off-by: Siddharth Chandrasekaran <[email protected]>
  • Loading branch information
sidcha committed Jan 10, 2025
1 parent 77fa008 commit ebdd0fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/crypto/tinyaes.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ void osdp_fill_random(uint8_t *buf, int len)

for (i = 0; i < len; i++) {
rnd = rand();
buf[i] = (uint8_t)(((float)rnd) / RAND_MAX * 256);
buf[i] = (uint8_t)(((float)rnd) / (float)RAND_MAX * 256);
}
}

Expand Down

0 comments on commit ebdd0fb

Please sign in to comment.