diff options
author | Jeremy Allison <jra@samba.org> | 2007-10-27 20:29:36 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2007-10-27 20:29:36 -0700 |
commit | d4307679b95088d05f0abad440de5e961ee965df (patch) | |
tree | 124a0602838845ac10494bcfa2b8014b115aefee /source3/lib/util_sock.c | |
parent | c7a7c08db5e998c8e698a11d3ec209b2744763da (diff) | |
download | samba-d4307679b95088d05f0abad440de5e961ee965df.tar.gz samba-d4307679b95088d05f0abad440de5e961ee965df.tar.xz samba-d4307679b95088d05f0abad440de5e961ee965df.zip |
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)
Diffstat (limited to 'source3/lib/util_sock.c')
-rw-r--r-- | source3/lib/util_sock.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/lib/util_sock.c b/source3/lib/util_sock.c index 91da4074582..e66bd5f15a1 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; } /******************************************************************* |