From: Ruben Kerkhof Date: Tue, 2 Aug 2016 15:16:58 +0000 (+0200) Subject: treewide: Use AF_UNSPEC consistently X-Git-Tag: collectd-5.6.0~127^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1831%2Fhead;p=thirdparty%2Fcollectd.git treewide: Use AF_UNSPEC consistently .ai_family expects an address family, not a protocol family. Note that on most platforms these constants are the same, so this is purely cosmetic. --- diff --git a/src/hddtemp.c b/src/hddtemp.c index 1b7ed329a..e7b4d8a10 100644 --- a/src/hddtemp.c +++ b/src/hddtemp.c @@ -101,7 +101,7 @@ static int hddtemp_query_daemon (char *buffer, int buffer_size) struct addrinfo ai_hints = { .ai_flags = AI_ADDRCONFIG, - .ai_family = PF_UNSPEC, + .ai_family = AF_UNSPEC, .ai_protocol = IPPROTO_TCP, .ai_socktype = SOCK_STREAM }; diff --git a/src/mbmon.c b/src/mbmon.c index 1f0a0d638..5f398d0c8 100644 --- a/src/mbmon.c +++ b/src/mbmon.c @@ -96,7 +96,7 @@ static int mbmon_query_daemon (char *buffer, int buffer_size) port = MBMON_DEF_PORT; struct addrinfo ai_hints = { - .ai_family = PF_UNSPEC, + .ai_family = AF_UNSPEC, .ai_flags = AI_ADDRCONFIG, .ai_protocol = IPPROTO_TCP, .ai_socktype = SOCK_STREAM diff --git a/src/ntpd.c b/src/ntpd.c index e075a208b..c3dee22c2 100644 --- a/src/ntpd.c +++ b/src/ntpd.c @@ -364,7 +364,7 @@ static int ntpd_connect (void) port = NTPD_DEFAULT_PORT; struct addrinfo ai_hints = { - .ai_family = PF_UNSPEC, + .ai_family = AF_UNSPEC, .ai_flags = AI_ADDRCONFIG, .ai_protocol = IPPROTO_UDP, .ai_socktype = SOCK_DGRAM diff --git a/src/olsrd.c b/src/olsrd.c index ac47811ce..7838ebaaa 100644 --- a/src/olsrd.c +++ b/src/olsrd.c @@ -155,7 +155,7 @@ static FILE *olsrd_connect (void) /* {{{ */ FILE *fh; struct addrinfo ai_hints = { - .ai_family = PF_UNSPEC, + .ai_family = AF_UNSPEC, .ai_flags = AI_ADDRCONFIG, .ai_protocol = IPPROTO_TCP, .ai_socktype = SOCK_STREAM