]> granicus.if.org Git - libevent/commitdiff
test/http: don't mix declarations and code (fixes -Wdeclaration-after-statement)
authorAzat Khuzhin <a3at.mail@gmail.com>
Fri, 17 Jun 2016 13:07:15 +0000 (16:07 +0300)
committerAzat Khuzhin <a3at.mail@gmail.com>
Fri, 17 Jun 2016 13:07:15 +0000 (16:07 +0300)
test/regress_http.c

index a7c06b9d008e6f65c270aef56b2dcba22f813f00..2b77c07f79ddab584479658d0631a9101ecaf149 100644 (file)
@@ -1389,9 +1389,8 @@ http_cancel_test(void *arg)
        struct event_base *inactive_base = NULL;
        struct evhttp_connection **evcons = NULL;
 
-       enum http_cancel_test_type type;
-       type = (enum http_cancel_test_type)data->setup_data;
-
+       enum http_cancel_test_type type =
+               (enum http_cancel_test_type)data->setup_data;
        struct evhttp *http = http_setup(&port, data->base, 0);
 
        if (type & BY_HOST) {