treewide: Use AF_UNSPEC consistently
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Tue, 2 Aug 2016 15:16:58 +0000 (17:16 +0200)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Wed, 3 Aug 2016 08:06:07 +0000 (10:06 +0200)
.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.

src/hddtemp.c
src/mbmon.c
src/ntpd.c
src/olsrd.c

index 1b7ed32..e7b4d8a 100644 (file)
@@ -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
        };
index 1f0a0d6..5f398d0 100644 (file)
@@ -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
index e075a20..c3dee22 100644 (file)
@@ -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
index ac47811..7838eba 100644 (file)
@@ -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