summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbluhm <>2019-06-12 11:31:36 +0000
committerbluhm <>2019-06-12 11:31:36 +0000
commit9f9b63f279646fe16eb9a07ade4e1fb8b665eac4 (patch)
tree3fc075e555d98a61f3ffc6ce86006963c8d62e6c /src
parent7992fd2a4be205fca783974b62f801986019bae4 (diff)
downloadopenbsd-9f9b63f279646fe16eb9a07ade4e1fb8b665eac4.tar.gz
openbsd-9f9b63f279646fe16eb9a07ade4e1fb8b665eac4.tar.bz2
openbsd-9f9b63f279646fe16eb9a07ade4e1fb8b665eac4.zip
Set malloc_options in global scope with an initializer.
recommended by otto@
Diffstat (limited to 'src')
-rw-r--r--src/regress/lib/libc/malloc/malloc_ulimit1/malloc_ulimit1.c9
-rw-r--r--src/regress/lib/libc/malloc/malloc_ulimit2/malloc_ulimit2.c9
2 files changed, 8 insertions, 10 deletions
diff --git a/src/regress/lib/libc/malloc/malloc_ulimit1/malloc_ulimit1.c b/src/regress/lib/libc/malloc/malloc_ulimit1/malloc_ulimit1.c
index 20dd1a419e..799d2b9117 100644
--- a/src/regress/lib/libc/malloc/malloc_ulimit1/malloc_ulimit1.c
+++ b/src/regress/lib/libc/malloc/malloc_ulimit1/malloc_ulimit1.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: malloc_ulimit1.c,v 1.4 2018/11/28 13:34:06 bluhm Exp $ */ 1/* $OpenBSD: malloc_ulimit1.c,v 1.5 2019/06/12 11:31:36 bluhm Exp $ */
2 2
3/* Public Domain, 2006, Otto Moerbeek <otto@drijf.net> */ 3/* Public Domain, 2006, Otto Moerbeek <otto@drijf.net> */
4 4
@@ -22,6 +22,9 @@
22#define STARTI 1300 22#define STARTI 1300
23#define FACTOR 1024 23#define FACTOR 1024
24 24
25/* This test takes forever with junking turned on. */
26char *malloc_options = "jj";
27
25int 28int
26main() 29main()
27{ 30{
@@ -29,10 +32,6 @@ main()
29 size_t sz; 32 size_t sz;
30 int i; 33 int i;
31 void *p; 34 void *p;
32 extern char *malloc_options;
33
34 /* This test takes forever with junking turned on. */
35 malloc_options = "jj";
36 35
37 if (getrlimit(RLIMIT_DATA, &lim) == -1) 36 if (getrlimit(RLIMIT_DATA, &lim) == -1)
38 err(1, "getrlimit"); 37 err(1, "getrlimit");
diff --git a/src/regress/lib/libc/malloc/malloc_ulimit2/malloc_ulimit2.c b/src/regress/lib/libc/malloc/malloc_ulimit2/malloc_ulimit2.c
index f083e31841..5d9e3774e7 100644
--- a/src/regress/lib/libc/malloc/malloc_ulimit2/malloc_ulimit2.c
+++ b/src/regress/lib/libc/malloc/malloc_ulimit2/malloc_ulimit2.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: malloc_ulimit2.c,v 1.4 2018/11/29 22:23:22 bluhm Exp $ */ 1/* $OpenBSD: malloc_ulimit2.c,v 1.5 2019/06/12 11:31:36 bluhm Exp $ */
2 2
3/* Public Domain, 2006, Otto Moerbeek <otto@drijf.net> */ 3/* Public Domain, 2006, Otto Moerbeek <otto@drijf.net> */
4 4
@@ -11,6 +11,9 @@
11 11
12#define FACTOR 1024 12#define FACTOR 1024
13 13
14/* This test takes forever with junking turned on. */
15char *malloc_options = "jj";
16
14int 17int
15main() 18main()
16{ 19{
@@ -18,10 +21,6 @@ main()
18 size_t sz; 21 size_t sz;
19 int i; 22 int i;
20 void *p; 23 void *p;
21 extern char *malloc_options;
22
23 /* This test takes forever with junking turned on. */
24 malloc_options = "jj";
25 24
26 if (getrlimit(RLIMIT_DATA, &lim) == -1) 25 if (getrlimit(RLIMIT_DATA, &lim) == -1)
27 err(1, "getrlimit"); 26 err(1, "getrlimit");