]> granicus.if.org Git - libevent/commitdiff
Refactor test_getaddrinfo_async_cancel_stress()
authorSebastian Hahn <sebastian@torproject.org>
Mon, 11 Apr 2011 15:48:23 +0000 (17:48 +0200)
committerSebastian Hahn <sebastian@torproject.org>
Sat, 23 Apr 2011 00:04:58 +0000 (02:04 +0200)
Turns out it didn't need an event base set up.

Spotted by clang's static anaylzer

test/regress_dns.c

index 086fd429143f18bfa3fd53422ec8e728b7e598ba..7868bbb3d5950fdca8ad351e42c7f04595b04113 100644 (file)
@@ -1626,10 +1626,9 @@ gaic_launch(struct event_base *base, struct evdns_base *dns_base)
 }
 
 static void
-test_getaddrinfo_async_cancel_stress(void *arg)
+test_getaddrinfo_async_cancel_stress(void *ptr)
 {
-       struct basic_test_data *data = arg;
-       struct event_base *base = data->base;
+       struct event_base *base;
        struct evdns_base *dns_base = NULL;
        struct evdns_server_port *server = NULL;
        evutil_socket_t fd = -1;
@@ -1701,7 +1700,7 @@ struct testcase_t dns_testcases[] = {
        { "getaddrinfo_async", test_getaddrinfo_async,
          TT_FORK|TT_NEED_BASE, &basic_setup, (char*)"" },
        { "getaddrinfo_cancel_stress", test_getaddrinfo_async_cancel_stress,
-         TT_FORK|TT_NEED_BASE, &basic_setup, (char*)"" },
+         TT_FORK, NULL, NULL },
 
        END_OF_TESTCASES
 };