aboutsummaryrefslogtreecommitdiff
path: root/tests/util/xmalloc.c
diff options
context:
space:
mode:
authorRuss Allbery <rra@stanford.edu>2010-08-25 15:08:05 -0700
committerRuss Allbery <rra@stanford.edu>2010-08-25 15:08:05 -0700
commit468ded4c2fae05a815bef91bdcb17d52f9cdcb2b (patch)
treeb2b836734664367c03691a8594684187a1be4054 /tests/util/xmalloc.c
parent32dc393016f0b6241dbf8d405638e18a33bb9b62 (diff)
Update to rra-c-util 2.6 and C TAP Harness 1.5
Update to C TAP Harness 1.5: * Better reporting of fatal errors in the test suite. * Summarize results at the end of test execution. * Add tests/HOWTO from docs/writing-tests in C TAP Harness. Update to rra-c-util 2.6: * Fix portability to bundled Heimdal on OpenBSD. * Improve checking for krb5_kt_free_entry with older MIT Kerberos. * Fix portability for missing krb5_get_init_creds_opt_free. * Fix header guard for util/xwrite.h. * Restore default compiler configuration after GSS-API library probe.
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) {