diff options
author | 2019-06-12 11:31:36 +0000 | |
---|---|---|
committer | 2019-06-12 11:31:36 +0000 | |
commit | 093d2a7874ca789cdac942502fadbc051525bb5f (patch) | |
tree | ec58e811c86f39f50738fd3033f8d92dc44b778d | |
parent | these were moved to key.[ch] in previous commit (diff) | |
download | wireguard-openbsd-093d2a7874ca789cdac942502fadbc051525bb5f.tar.xz wireguard-openbsd-093d2a7874ca789cdac942502fadbc051525bb5f.zip |
Set malloc_options in global scope with an initializer.
recommended by otto@
-rw-r--r-- | regress/lib/libc/malloc/malloc_ulimit1/malloc_ulimit1.c | 9 | ||||
-rw-r--r-- | regress/lib/libc/malloc/malloc_ulimit2/malloc_ulimit2.c | 9 |
2 files changed, 8 insertions, 10 deletions
diff --git a/regress/lib/libc/malloc/malloc_ulimit1/malloc_ulimit1.c b/regress/lib/libc/malloc/malloc_ulimit1/malloc_ulimit1.c index 20dd1a419e4..799d2b9117e 100644 --- a/regress/lib/libc/malloc/malloc_ulimit1/malloc_ulimit1.c +++ b/regress/lib/libc/malloc/malloc_ulimit1/malloc_ulimit1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: malloc_ulimit1.c,v 1.4 2018/11/28 13:34:06 bluhm Exp $ */ +/* $OpenBSD: malloc_ulimit1.c,v 1.5 2019/06/12 11:31:36 bluhm Exp $ */ /* Public Domain, 2006, Otto Moerbeek <otto@drijf.net> */ @@ -22,6 +22,9 @@ #define STARTI 1300 #define FACTOR 1024 +/* This test takes forever with junking turned on. */ +char *malloc_options = "jj"; + int main() { @@ -29,10 +32,6 @@ main() size_t sz; int i; void *p; - extern char *malloc_options; - - /* This test takes forever with junking turned on. */ - malloc_options = "jj"; if (getrlimit(RLIMIT_DATA, &lim) == -1) err(1, "getrlimit"); diff --git a/regress/lib/libc/malloc/malloc_ulimit2/malloc_ulimit2.c b/regress/lib/libc/malloc/malloc_ulimit2/malloc_ulimit2.c index f083e31841d..5d9e3774e71 100644 --- a/regress/lib/libc/malloc/malloc_ulimit2/malloc_ulimit2.c +++ b/regress/lib/libc/malloc/malloc_ulimit2/malloc_ulimit2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: malloc_ulimit2.c,v 1.4 2018/11/29 22:23:22 bluhm Exp $ */ +/* $OpenBSD: malloc_ulimit2.c,v 1.5 2019/06/12 11:31:36 bluhm Exp $ */ /* Public Domain, 2006, Otto Moerbeek <otto@drijf.net> */ @@ -11,6 +11,9 @@ #define FACTOR 1024 +/* This test takes forever with junking turned on. */ +char *malloc_options = "jj"; + int main() { @@ -18,10 +21,6 @@ main() size_t sz; int i; void *p; - extern char *malloc_options; - - /* This test takes forever with junking turned on. */ - malloc_options = "jj"; if (getrlimit(RLIMIT_DATA, &lim) == -1) err(1, "getrlimit"); |