summaryrefslogtreecommitdiff
path: root/util/libreboot-utils/lottery.c
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-03-27 22:03:08 +0000
committerLeah Rowe <leah@libreboot.org>2026-03-27 22:03:08 +0000
commitc48938c577aa9a9e91f0d925ae00a82cbbd428d3 (patch)
tree5d0517831319ab80d51d91ec34f4db9c3b647f80 /util/libreboot-utils/lottery.c
parent1e23ee26b1a476ecfebefe853e593ae5db48cbc5 (diff)
cleanup
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/libreboot-utils/lottery.c')
-rw-r--r--util/libreboot-utils/lottery.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/util/libreboot-utils/lottery.c b/util/libreboot-utils/lottery.c
index f7c467e2..540bb8d6 100644
--- a/util/libreboot-utils/lottery.c
+++ b/util/libreboot-utils/lottery.c
@@ -37,14 +37,15 @@ hell:
size[0] = rsize(SIZE_MAX); /* \( ^o^)/ - then come play! */
size[1] = rsize(SIZE_MAX); /* | | */
-/* / \ */
+
if (!(size[0] && (size[0] == size[1]) && (size[0] <= SIZE_MAX)) ||
((size[0] & 1) && (*(b1 = mkrstr(1)) != *(b2 = mkrstr(1)))))
- goto out; /* \(^-^)/ - it could be you! */
- if (!(size[0] &= ~(size_t)1)) /* \ / */
- goto hell; /* / \ */
-
- if (s == NULL) {
+ goto out;
+ if (!(size[0] &= ~(size_t)1))
+ goto hell;
+/* \(^-^)/ - it could be you! */
+ if (s == NULL) { /* \ / */
+/* \/ */
if ((s = malloc(BUFSIZ)) == NULL)
goto out;
}