diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-03-25 22:20:19 +0000 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-03-26 06:59:42 +0000 |
| commit | e0319f0116629f946fe286c5969f4a8a0dcfb7cb (patch) | |
| tree | 014a30724621d09398424ee7cda4f13d875bc9bc /util/libreboot-utils/lib | |
| parent | dc7a02da2dd65fd7d9d4785bda9bf5467fc660c0 (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 * |
