[PATCH net-next v2] geneve: Use empty braces for addr6 initializer

Nathan Chancellor
2018-11-13T06:12:51Z

Clang warns:

drivers/net/geneve.c:428:29: error: suggest braces around initialization
of subobject [-Werror,-Wmissing-braces]
struct in6_addr addr6 = { 0 };
^
{}

Most initializations of structs in the kernel seem to use this format.

Fixes: a07966447f39 ("geneve: ICMP error lookup handler")
Suggested-by: Joe Perches <joe@perches.com>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
---

v1 -> v2:

* Just remove the zero instead of adding more braces as it seems to
match the rest of the kernel (as suggested by Joe Perches).

drivers/net/geneve.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/geneve.c b/drivers/net/geneve.c
index 7c53e06b31c3..f09e58b7b01e 100644
--- a/drivers/net/geneve.c
+++ b/drivers/net/geneve.c
@@ -425,7 +425,7 @@ static int geneve_udp_encap_err_lookup(struct sock *sk, struct sk_buff *skb)
#if IS_ENABLED(CONFIG_IPV6)
if (geneve_get_sk_family(gs) == AF_INET6) {
struct ipv6hdr *ip6h = ipv6_hdr(skb);
- struct in6_addr addr6 = { 0 };
+ struct in6_addr addr6 = { };

if (!gs->collect_md) {
vni = geneve_hdr(skb)->vni;
--
2.19.1