summaryrefslogtreecommitdiff
path: root/tests/util/xmalloc.c
diff options
context:
space:
mode:
authorRuss Allbery <rra@stanford.edu>2010-08-25 18:01:37 -0700
committerRuss Allbery <rra@stanford.edu>2010-08-25 18:01:37 -0700
commite91c0b93355b28617f7c0d756026856762ece242 (patch)
tree35c4fb8ab35ec5b8d140a0b7e869848a1fac39a9 /tests/util/xmalloc.c
parent602ff7584d3668c36b1bf5fd43988e6f45eceb48 (diff)
Imported Upstream version 0.12
Diffstat (limited to 'tests/util/xmalloc.c')
-rw-r--r--tests/util/xmalloc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/util/xmalloc.c b/tests/util/xmalloc.c
index 3bd5588..b6f4564 100644
--- a/tests/util/xmalloc.c
+++ b/tests/util/xmalloc.c
@@ -246,8 +246,6 @@ main(int argc, char *argv[])
size_t limit = 0;
int willfail = 0;
unsigned char code;
- struct rlimit rl;
- void *tmp;
if (argc < 3)
die("Usage error. Type, size, and limit must be given.");
@@ -290,6 +288,9 @@ main(int argc, char *argv[])
*/
if (limit > 0) {
#if HAVE_SETRLIMIT && defined(RLIMIT_AS)
+ struct rlimit rl;
+ void *tmp;
+
rl.rlim_cur = limit;
rl.rlim_max = limit;
if (setrlimit(RLIMIT_AS, &rl) < 0) {