summaryrefslogtreecommitdiff
path: root/lib/util
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2011-02-27 09:57:18 +0100
committerVolker Lendecke <vlendec@samba.org>2011-02-27 11:02:53 +0100
commitfec0baacb658eb1bfc15c8ca4dfeecc1cf84eb79 (patch)
tree93055e96b9d02adf9804c69a25f35c0dcf4067b4 /lib/util
parent561205b0166cb4a9c2efbb32b8429f6a83827eee (diff)
downloadsamba-fec0baacb658eb1bfc15c8ca4dfeecc1cf84eb79.tar.gz
samba-fec0baacb658eb1bfc15c8ca4dfeecc1cf84eb79.tar.bz2
samba-fec0baacb658eb1bfc15c8ca4dfeecc1cf84eb79.zip
s3: Make is_zero_addr take a sockaddr_storage
All callers had to cast this anyway Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Sun Feb 27 11:02:53 CET 2011 on sn-devel-104
Diffstat (limited to 'lib/util')
-rw-r--r--lib/util/util_net.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/util/util_net.c b/lib/util/util_net.c
index 8a9b5b1f24..9c8f5c6d47 100644
--- a/lib/util/util_net.c
+++ b/lib/util/util_net.c
@@ -384,16 +384,16 @@ bool is_loopback_addr(const struct sockaddr *pss)
/**
* Check if a struct sockaddr has an unspecified address.
*/
-bool is_zero_addr(const struct sockaddr *pss)
+bool is_zero_addr(const struct sockaddr_storage *pss)
{
#if defined(HAVE_IPV6)
- if (pss->sa_family == AF_INET6) {
+ if (pss->ss_family == AF_INET6) {
const struct in6_addr *pin6 =
&((const struct sockaddr_in6 *)pss)->sin6_addr;
return IN6_IS_ADDR_UNSPECIFIED(pin6);
}
#endif
- if (pss->sa_family == AF_INET) {
+ if (pss->ss_family == AF_INET) {
const struct in_addr *pin = &((const struct sockaddr_in *)pss)->sin_addr;
return is_zero_ip_v4(*pin);
}