]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Squelch a "const object should be initialized" warning.
authorGuy Harris <[email protected]>
Thu, 18 Apr 2019 04:15:39 +0000 (21:15 -0700)
committerGuy Harris <[email protected]>
Thu, 18 Apr 2019 04:15:39 +0000 (21:15 -0700)
MSVC says a const object should be initialized, so initialize it.

Use nd_ipv6 as the type, while we're at it (it shouldn't make a
difference, but this means we know the type - array of 16 octets - so we
can just initialize it with { 0 }).

print-ripng.c

index 3cfcff5777c41d5d9ac8db2e5dd8c724351e2133..384fe9cacf2d340c5bfa7ea7aca008fb74add7f4 100644 (file)
@@ -87,7 +87,7 @@ struct        rip6 {
 
 static int ND_IN6_IS_ADDR_UNSPECIFIED(const nd_ipv6 *addr)
 {
-    static const struct in6_addr in6addr_any_val;        /* :: */
+    static const nd_ipv6 in6addr_any_val = { 0 };        /* :: */
     return (memcmp(addr, &in6addr_any_val, sizeof(*addr)) == 0);
 }