src: Code cleanup
This commit is contained in:
parent
6c147aa1c5
commit
60c0c2dd56
|
@ -170,8 +170,8 @@ int resolve_hostname(Address *addr, const char *hostname, uint16_t port,
|
||||||
auto res_d = defer(freeaddrinfo, res);
|
auto res_d = defer(freeaddrinfo, res);
|
||||||
|
|
||||||
char host[NI_MAXHOST];
|
char host[NI_MAXHOST];
|
||||||
rv = getnameinfo(res->ai_addr, res->ai_addrlen, host, sizeof(host), 0, 0,
|
rv = getnameinfo(res->ai_addr, res->ai_addrlen, host, sizeof(host), nullptr,
|
||||||
NI_NUMERICHOST);
|
0, NI_NUMERICHOST);
|
||||||
if (rv != 0) {
|
if (rv != 0) {
|
||||||
LOG(FATAL) << "Address resolution for " << hostname
|
LOG(FATAL) << "Address resolution for " << hostname
|
||||||
<< " failed: " << gai_strerror(rv);
|
<< " failed: " << gai_strerror(rv);
|
||||||
|
|
Loading…
Reference in New Issue