summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorjorton <jorton@13f79535-47bb-0310-9956-ffa450edef68>2004-07-08 10:53:44 +0000
committerjorton <jorton@13f79535-47bb-0310-9956-ffa450edef68>2004-07-08 10:53:44 +0000
commitb702ec37e505dde1ce8eaf2825ff80dc56fb567a (patch)
tree7a1c5629cefd055c7123ebf4842fda97dd707d6b /test
parente74bbde4fdab8a0204f35b8a2ae0b13e96d284aa (diff)
downloadlibapr-b702ec37e505dde1ce8eaf2825ff80dc56fb567a.tar.gz
* test/abts.c (abts_run_test): Avoid the malloc/free.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@65272 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test')
-rw-r--r--test/abts.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/test/abts.c b/test/abts.c
index 290435d67..2905a2592 100644
--- a/test/abts.c
+++ b/test/abts.c
@@ -153,7 +153,7 @@ abts_suite *abts_add_suite(abts_suite *suite, const char *suite_name_full)
void abts_run_test(abts_suite *ts, test_func f, void *value)
{
- abts_case *tc;
+ abts_case tc;
sub_suite *ss;
if (!should_test_run(ts->tail->name)) {
@@ -161,19 +161,17 @@ void abts_run_test(abts_suite *ts, test_func f, void *value)
}
ss = ts->tail;
- tc = malloc(sizeof(tc));
- tc->failed = 0;
- tc->suite = ss;
+ tc.failed = 0;
+ tc.suite = ss;
ss->num_test++;
update_status();
- f(tc, value);
+ f(&tc, value);
- if (tc->failed) {
+ if (tc.failed) {
ss->failed++;
}
- free(tc);
}
static int report(abts_suite *suite)