summaryrefslogtreecommitdiff
path: root/util/nvmutil/nvmutil.c
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-03-09 17:33:23 +0000
committerLeah Rowe <leah@libreboot.org>2026-03-09 17:33:23 +0000
commitb2a3edd170a6fbb17584906dde84d2daf94fb27c (patch)
treefa2720d57dc8726a1253b12675af6f98f1edd0fd /util/nvmutil/nvmutil.c
parent8f719f80b8f8b9dc128e902d1d2b94ee5c26a070 (diff)
util/nvmutil: only check n in rhex on linux
not bsd Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/nvmutil/nvmutil.c')
-rw-r--r--util/nvmutil/nvmutil.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c
index d84cd1c8..a023a48a 100644
--- a/util/nvmutil/nvmutil.c
+++ b/util/nvmutil/nvmutil.c
@@ -942,8 +942,10 @@ rhex(void)
#endif
}
+#ifndef NVMUTIL_ARC4RANDOM_BUF
if (!n)
err(ECANCELED, "Randomisation failure");
+#endif
return (uint16_t)(rnum[--n] & 0xf);
}