From e0319f0116629f946fe286c5969f4a8a0dcfb7cb Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Wed, 25 Mar 2026 22:20:19 +0000 Subject: util/libreboot-utils: randomisation test to test the effectiveness of the rand function Signed-off-by: Leah Rowe --- util/libreboot-utils/lib/rand.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'util/libreboot-utils/lib') 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 * -- cgit v1.2.1