Style and comment tweaks for dns/leak* tests

This commit is contained in:
Nick Mathewson 2011-10-19 22:41:11 -04:00
parent f7841bfc70
commit 5e42202d59

View File

@ -1637,6 +1637,10 @@ gaic_launch(struct event_base *base, struct evdns_base *dns_base)
++pending;
}
/* FIXME: We should move this to regress_main.c if anything else needs it.*/
/* Trivial replacements for malloc/free/realloc to check for memory leaks.
* Not threadsafe. */
static int allocated_chunks = 0;
static void *
@ -1679,6 +1683,7 @@ testleak_setup(const struct testcase_t *testcase)
event_set_mem_functions(cnt_malloc, cnt_realloc, cnt_free);
event_enable_debug_mode();
/* not mm_calloc: we don't want to mess with the count. */
env = calloc(1, sizeof(struct testleak_env_t));
env->base = event_base_new();
env->dns_base = evdns_base_new(env->base, 0);