]> 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)
committerAzat Khuzhin <azat@libevent.org>
Sat, 2 Feb 2019 12:17:57 +0000 (15:17 +0300)
(cherry picked from commit 514dc7579c43e673bdf613e01690371438661260)

http.c

diff --git a/http.c b/http.c
index c79e710cca0113f551fbbdd3629698074a8d0495..c22f953c2358cfed818b96c96d93b1a9b0d8a556 100644 (file)
--- a/http.c
+++ b/http.c
@@ -4836,6 +4836,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;
@@ -4843,7 +4845,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;