]> granicus.if.org Git - libevent/commitdiff
[http] fix C90 warnings
authorNathan French <nate@cl0d.com>
Thu, 5 Jul 2018 16:46:51 +0000 (12:46 -0400)
committerNathan French <nate@cl0d.com>
Thu, 5 Jul 2018 16:46:51 +0000 (12:46 -0400)
http.c

diff --git a/http.c b/http.c
index b04af9a36defbeec267620021a73c88069bf66ad..7db4d7827235adb9224ebd55f07724783e825648 100644 (file)
--- a/http.c
+++ b/http.c
@@ -4847,6 +4847,8 @@ static struct evhttp_uri *
 evhttp_uri_parse_authority(char *source_uri)
 {
        struct evhttp_uri *uri = mm_calloc(1, sizeof(struct evhttp_uri));
+       char *end;
+
        if (uri == NULL) {
                event_warn("%s: calloc", __func__);
                goto err;
@@ -4854,7 +4856,7 @@ evhttp_uri_parse_authority(char *source_uri)
        uri->port = -1;
        uri->flags = 0;
 
-       char *end = end_of_authority(source_uri);
+       end = end_of_authority(source_uri);
        if (parse_authority(uri, source_uri, end) < 0)
                goto err;