mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-18 08:49:57 -04:00
missing return (-1) for failures on make_socket
svn:r338
This commit is contained in:
parent
f86cead099
commit
995a58a374
3
http.c
3
http.c
@ -2261,7 +2261,7 @@ static int
|
|||||||
make_socket(int should_bind, const char *address, u_short port)
|
make_socket(int should_bind, const char *address, u_short port)
|
||||||
{
|
{
|
||||||
int fd;
|
int fd;
|
||||||
struct addrinfo ai, *aitop;
|
struct addrinfo ai, *aitop = NULL;
|
||||||
#ifdef HAVE_GETADDRINFO
|
#ifdef HAVE_GETADDRINFO
|
||||||
char strport[NI_MAXSERV];
|
char strport[NI_MAXSERV];
|
||||||
int ai_result;
|
int ai_result;
|
||||||
@ -2276,6 +2276,7 @@ make_socket(int should_bind, const char *address, u_short port)
|
|||||||
event_warn("getaddrinfo");
|
event_warn("getaddrinfo");
|
||||||
else
|
else
|
||||||
event_warnx("getaddrinfo: %s", gai_strerror(ai_result));
|
event_warnx("getaddrinfo: %s", gai_strerror(ai_result));
|
||||||
|
return (-1);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
if (fake_getaddrinfo(address, &ai) < 0) {
|
if (fake_getaddrinfo(address, &ai) < 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user