ctdb:common: Use C99 initializer for 'struct ifreq'
authorAndreas Schneider <asn@samba.org>
Thu, 13 Dec 2018 09:57:55 +0000 (10:57 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Mon, 28 Jan 2019 09:29:21 +0000 (10:29 +0100)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
ctdb/common/system_socket.c

index 668c045..c680043 100644 (file)
@@ -329,9 +329,17 @@ int ctdb_sys_send_arp(const ctdb_sock_addr *addr, const char *iface)
 {
        int s;
        struct sockaddr_ll sall = {0};
-       struct ifreq if_hwaddr = {{{0}}};
+       struct ifreq if_hwaddr = {
+               .ifr_ifru = {
+                       .ifru_flags = 0
+               },
+       };
        uint8_t buffer[MAX(ARP_BUFFER_SIZE, IP6_NA_BUFFER_SIZE)];
-       struct ifreq ifr = {{{0}}};
+       struct ifreq ifr = {
+               .ifr_ifru = {
+                       .ifru_flags = 0
+               },
+       };
        struct ether_addr *hwaddr = NULL;
        struct ether_addr *ether_dhost = NULL;
        size_t len = 0;