From d4307679b95088d05f0abad440de5e961ee965df Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sat, 27 Oct 2007 20:29:36 -0700 Subject: Change all occurrences of zero_addr(&ss,AF_INET) to zero_addr(&ss). All current uses were always of the AF_INET form, so simplify the call. If in the future we need to zero an addr to AF_INET6 this can be done separately. Jeremy. (This used to be commit 2e92418a138bf2738b77b7e0fcb2fa37ad84fc0c) --- source3/lib/util_sock.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source3/lib') diff --git a/source3/lib/util_sock.c b/source3/lib/util_sock.c index 91da407458..e66bd5f15a 100644 --- a/source3/lib/util_sock.c +++ b/source3/lib/util_sock.c @@ -238,7 +238,7 @@ bool interpret_string_addr(struct sockaddr_storage *pss, } #endif - zero_addr(pss, AF_INET); + zero_addr(pss); if (!interpret_string_addr_internal(&res, str, flags|AI_ADDRCONFIG)) { return false; @@ -343,14 +343,14 @@ void zero_ip_v4(struct in_addr *ip) } /******************************************************************* - Set an address to INADDR_ANY, or IN6ADDR_ANY. + Set an address to INADDR_ANY. ******************************************************************/ -void zero_addr(struct sockaddr_storage *pss, int family) +void zero_addr(struct sockaddr_storage *pss) { memset(pss, '\0', sizeof(*pss)); /* Ensure we're at least a valid sockaddr-storage. */ - pss->ss_family = family; + pss->ss_family = AF_INET; } /******************************************************************* -- cgit