mirror of
https://github.com/libevent/libevent.git
synced 2025-01-09 00:56:20 +08:00
[http] fix C90 warnings
This commit is contained in:
parent
24236aed01
commit
514dc7579c
4
http.c
4
http.c
@ -4847,6 +4847,8 @@ static struct evhttp_uri *
|
|||||||
evhttp_uri_parse_authority(char *source_uri)
|
evhttp_uri_parse_authority(char *source_uri)
|
||||||
{
|
{
|
||||||
struct evhttp_uri *uri = mm_calloc(1, sizeof(struct evhttp_uri));
|
struct evhttp_uri *uri = mm_calloc(1, sizeof(struct evhttp_uri));
|
||||||
|
char *end;
|
||||||
|
|
||||||
if (uri == NULL) {
|
if (uri == NULL) {
|
||||||
event_warn("%s: calloc", __func__);
|
event_warn("%s: calloc", __func__);
|
||||||
goto err;
|
goto err;
|
||||||
@ -4854,7 +4856,7 @@ evhttp_uri_parse_authority(char *source_uri)
|
|||||||
uri->port = -1;
|
uri->port = -1;
|
||||||
uri->flags = 0;
|
uri->flags = 0;
|
||||||
|
|
||||||
char *end = end_of_authority(source_uri);
|
end = end_of_authority(source_uri);
|
||||||
if (parse_authority(uri, source_uri, end) < 0)
|
if (parse_authority(uri, source_uri, end) < 0)
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user