From 60c0c2dd565e4b6865c40334ded90b0bdeb71d41 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sun, 7 Feb 2016 18:41:38 +0900 Subject: [PATCH] src: Code cleanup --- src/shrpx.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shrpx.cc b/src/shrpx.cc index 5ba58fb3..e93c5d67 100644 --- a/src/shrpx.cc +++ b/src/shrpx.cc @@ -170,8 +170,8 @@ int resolve_hostname(Address *addr, const char *hostname, uint16_t port, auto res_d = defer(freeaddrinfo, res); char host[NI_MAXHOST]; - rv = getnameinfo(res->ai_addr, res->ai_addrlen, host, sizeof(host), 0, 0, - NI_NUMERICHOST); + rv = getnameinfo(res->ai_addr, res->ai_addrlen, host, sizeof(host), nullptr, + 0, NI_NUMERICHOST); if (rv != 0) { LOG(FATAL) << "Address resolution for " << hostname << " failed: " << gai_strerror(rv);