summaryrefslogtreecommitdiff
path: root/regress/sys
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2021-05-21 20:42:22 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2021-05-21 20:42:22 +0000
commit357cc42e73460fd5a4c4f4e85558e37aee7a8f0c (patch)
tree5b30d28a2f0639e7cbd14a759b9288d737b02c5e /regress/sys
parentcb5d7ab7fe3aa6dccf46f24a3718de1447ece248 (diff)
Fix the calculation of the maximum stack size in the command line
option -s.
Diffstat (limited to 'regress/sys')
-rw-r--r--regress/sys/kern/fork-exit/fork-exit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/regress/sys/kern/fork-exit/fork-exit.c b/regress/sys/kern/fork-exit/fork-exit.c
index 6d52ade44ef..6295b00b100 100644
--- a/regress/sys/kern/fork-exit/fork-exit.c
+++ b/regress/sys/kern/fork-exit/fork-exit.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fork-exit.c,v 1.4 2021/05/21 20:21:10 bluhm Exp $ */
+/* $OpenBSD: fork-exit.c,v 1.5 2021/05/21 20:42:21 bluhm Exp $ */
/*
* Copyright (c) 2021 Alexander Bluhm <bluhm@openbsd.org>
@@ -236,7 +236,7 @@ main(int argc, char *argv[])
break;
case 's':
stack = strtonum(optarg, 0,
- (INT_MAX - 2) / (4096 + 32), &errstr);
+ (INT_MAX / (4096 + 32)) - 2, &errstr);
if (errstr != NULL)
errx(1, "number of stack allocations is %s: %s",
errstr, optarg);