diff options
author | Russ Allbery <rra@stanford.edu> | 2010-08-25 18:01:37 -0700 |
---|---|---|
committer | Russ Allbery <rra@stanford.edu> | 2010-08-25 18:01:37 -0700 |
commit | 5cc66fdef38a67e25850159c0c5282d6dc927178 (patch) | |
tree | 9636351ee75eacc2f74a989fd8fad712fe95e6ec /tests/util/xmalloc.c | |
parent | d46528a011f58881af9e9fb0c11de6422d469f17 (diff) | |
parent | e91c0b93355b28617f7c0d756026856762ece242 (diff) |
Merge commit 'upstream/0.12' into debian
Diffstat (limited to 'tests/util/xmalloc.c')
-rw-r--r-- | tests/util/xmalloc.c | 5 |
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) { |