nghttpx: Don't need to const_cast to sockaddr*

This commit is contained in:
Tatsuhiro Tsujikawa 2015-02-22 12:06:31 +09:00
parent 7f9de007d0
commit 49781da8f0
2 changed files with 2 additions and 4 deletions

View File

@ -226,8 +226,7 @@ int Http2Session::initiate_connection() {
return -1; return -1;
} }
rv = connect(conn_.fd, const_cast<sockaddr *>( rv = connect(conn_.fd, &get_config()->downstream_http_proxy_addr.sa,
&get_config()->downstream_http_proxy_addr.sa),
get_config()->downstream_http_proxy_addrlen); get_config()->downstream_http_proxy_addrlen);
if (rv != 0 && errno != EINPROGRESS) { if (rv != 0 && errno != EINPROGRESS) {
SSLOG(ERROR, this) << "Failed to connect to the proxy " SSLOG(ERROR, this) << "Failed to connect to the proxy "

View File

@ -161,8 +161,7 @@ int HttpDownstreamConnection::attach_downstream(Downstream *downstream) {
} }
int rv; int rv;
rv = connect(conn_.fd, const_cast<sockaddr *>( rv = connect(conn_.fd, &get_config()->downstream_addrs[i].addr.sa,
&get_config()->downstream_addrs[i].addr.sa),
get_config()->downstream_addrs[i].addrlen); get_config()->downstream_addrs[i].addrlen);
if (rv != 0 && errno != EINPROGRESS) { if (rv != 0 && errno != EINPROGRESS) {
auto error = errno; auto error = errno;