diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-03-25 22:20:19 +0000 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-03-25 22:29:15 +0000 |
| commit | 7284da14615b04fff1587ec73ad979c9fea8a13b (patch) | |
| tree | bcdb6f5c619920f152348ecedaa39b240837f170 /util/libreboot-utils/lib | |
| parent | 491e41598a2cb88d96ce3820cbc1bd483aa4e597 (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')
| -rw-r--r-- | util/libreboot-utils/lib/rand.c | 10 |
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 * |
