summaryrefslogtreecommitdiff
path: root/util/libreboot-utils/lottery.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/libreboot-utils/lottery.c')
-rw-r--r--util/libreboot-utils/lottery.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/util/libreboot-utils/lottery.c b/util/libreboot-utils/lottery.c
index fd39c68c..7370de1b 100644
--- a/util/libreboot-utils/lottery.c
+++ b/util/libreboot-utils/lottery.c
@@ -18,7 +18,7 @@ main(int argc, char **argv)
{
int same = 0;
char *buf;
- size_t size = 8589934592;
+ size_t size = BUFSIZ;
(void) argc, (void) argv;
(void) errhook(exit_cleanup);
@@ -28,7 +28,7 @@ main(int argc, char **argv)
xpledgex("stdio", NULL);
buf = rmalloc(size);
- if (!memcmp(buf, buf + (size >> 1), size >> 1))
+ if (!vcmp(buf, buf + (size >> 1), size >> 1))
same = 1;
if (argc < 2) /* no spew */
@@ -36,7 +36,7 @@ main(int argc, char **argv)
free_and_set_null(&buf);
fprintf(stderr, "\n%s\n", same ? "You win!" : "You lose!");
- return same ^ 1;
+ return same ? EXIT_SUCCESS : EXIT_FAILURE;
}
static void