summaryrefslogtreecommitdiff
path: root/util/libreboot-utils/lib/rand.c
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-03-25 22:20:19 +0000
committerLeah Rowe <leah@libreboot.org>2026-03-26 06:59:42 +0000
commite0319f0116629f946fe286c5969f4a8a0dcfb7cb (patch)
tree014a30724621d09398424ee7cda4f13d875bc9bc /util/libreboot-utils/lib/rand.c
parentdc7a02da2dd65fd7d9d4785bda9bf5467fc660c0 (diff)
util/libreboot-utils: randomisation test
to test the effectiveness of the rand function Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/libreboot-utils/lib/rand.c')
-rw-r--r--util/libreboot-utils/lib/rand.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/util/libreboot-utils/lib/rand.c b/util/libreboot-utils/lib/rand.c
index 392ec2ba..29a756ed 100644
--- a/util/libreboot-utils/lib/rand.c
+++ b/util/libreboot-utils/lib/rand.c
@@ -100,17 +100,13 @@ win_lottery(void)
win:
free_if_null(&s1), free_if_null(&s2);
- err_no_cleanup(0, ELOTTERY,
- "Congratulations! you won the errno lottery");
-
- exit(1);
- return -1;
+ printf("Congratulations! you won the errno lottery!\n");
+ return 1;
err:
/* the lottery won you */
free_if_null(&s1), free_if_null(&s2);
err_no_cleanup(0, EFAULT, "lottery won you");
- exit(1);
- return -1;
+ return 0;
}
char *