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: https://git.verplant.org/?a=commitdiff_plain;h=71bbf854d3e6f8c6d6c3582527263bb01a3a7e04;p=collectd.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 1b7ed329..e7b4d8a1 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 1f0a0d63..5f398d0c 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 e075a208..c3dee22c 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 ac47811c..7838ebaa 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