From: Simon Ruderich Date: Tue, 15 Mar 2011 16:12:11 +0000 (+0100) Subject: src/tlsproxy.c: Add missing htonl() for INADDR_ANY. X-Git-Tag: 0.2~18 X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=1071e9bc4a3a5d43daad163be5bc4388abf3a84f;p=tlsproxy%2Ftlsproxy.git src/tlsproxy.c: Add missing htonl() for INADDR_ANY. Not really necessary as INADDR_ANY is normally 0. --- diff --git a/src/tlsproxy.c b/src/tlsproxy.c index a54a6e9..7a27f55 100644 --- a/src/tlsproxy.c +++ b/src/tlsproxy.c @@ -181,7 +181,7 @@ int main(int argc, char **argv) { memset(&server_in, 0, sizeof(server_in)); #ifdef USE_IPV4_ONLY server_in.sin_family = AF_INET; /* IPv4 only */ - server_in.sin_addr.s_addr = INADDR_ANY; /* bind to any address */ + server_in.sin_addr.s_addr = htonl(INADDR_ANY); /* bind to any address */ server_in.sin_port = htons((uint16_t)port); /* port to bind to */ #else server_in.sin6_family = AF_INET6; /* IPv6 (and IPv4) */