util/nvmutil: only check n in rhex on linux

not bsd

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2026-03-09 17:33:23 +00:00
parent 8f719f80b8
commit b2a3edd170
+2
View File
@@ -942,8 +942,10 @@ rhex(void)
#endif
}
#ifndef NVMUTIL_ARC4RANDOM_BUF
if (!n)
err(ECANCELED, "Randomisation failure");
#endif
return (uint16_t)(rnum[--n] & 0xf);
}