[libc-commits] [PATCH] D147981: [LIBC] Fix `getrandom` success return value
Michael Jones via Phabricator via libc-commits
libc-commits at lists.llvm.org
Tue Apr 11 11:40:34 PDT 2023
michaelrj added inline comments.
================
Comment at: libc/test/src/sys/random/linux/getrandom_test.cpp:35
+ uint8_t buf[SIZE];
+ for (size_t i = 0; i < SIZE; i += 1 + (i % 64)) {
+ // Without GRND_RANDOM set, this should never fail
----------------
I'm not sure why the mod operation is here, maybe add a comment explaining?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147981/new/
https://reviews.llvm.org/D147981
More information about the libc-commits
mailing list