mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-13 14:26:30 -04:00
Style and comment tweaks for dns/leak* tests
This commit is contained in:
parent
f7841bfc70
commit
5e42202d59
@ -1637,6 +1637,10 @@ gaic_launch(struct event_base *base, struct evdns_base *dns_base)
|
|||||||
++pending;
|
++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 int allocated_chunks = 0;
|
||||||
|
|
||||||
static void *
|
static void *
|
||||||
@ -1679,6 +1683,7 @@ testleak_setup(const struct testcase_t *testcase)
|
|||||||
event_set_mem_functions(cnt_malloc, cnt_realloc, cnt_free);
|
event_set_mem_functions(cnt_malloc, cnt_realloc, cnt_free);
|
||||||
event_enable_debug_mode();
|
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 = calloc(1, sizeof(struct testleak_env_t));
|
||||||
env->base = event_base_new();
|
env->base = event_base_new();
|
||||||
env->dns_base = evdns_base_new(env->base, 0);
|
env->dns_base = evdns_base_new(env->base, 0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user