From mboxrd@z Thu Jan 1 00:00:00 1970 From: Serhey Popovych Subject: [PATCH iproute2 2/3] link_ip6tnl: Use IN6ADDR_ANY_INIT to initialize local/remote endpoints Date: Mon, 18 Dec 2017 19:48:04 +0200 Message-ID: <1513619285-23187-3-git-send-email-serhe.popovych@gmail.com> References: <1513619285-23187-1-git-send-email-serhe.popovych@gmail.com> To: netdev@vger.kernel.org Return-path: Received: from mail-lf0-f65.google.com ([209.85.215.65]:42627 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S937656AbdLRRsO (ORCPT ); Mon, 18 Dec 2017 12:48:14 -0500 Received: by mail-lf0-f65.google.com with SMTP id e30so1830916lfb.9 for ; Mon, 18 Dec 2017 09:48:13 -0800 (PST) Received: from tuxracer.localdomain ([2a01:6d80::195:20:96:53]) by smtp.gmail.com with ESMTPSA id v86sm1031988lfd.65.2017.12.18.09.48.11 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Dec 2017 09:48:11 -0800 (PST) In-Reply-To: <1513619285-23187-1-git-send-email-serhe.popovych@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: Use specialized helper to initialize endpoint addresses with zeros instead of open coding this. This unifies initialization style with other ipv6 tunnel variants (i.e. gre6 and vti6). Signed-off-by: Serhey Popovych --- ip/link_ip6tnl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ip/link_ip6tnl.c b/ip/link_ip6tnl.c index 83a4320..f11ddd5 100644 --- a/ip/link_ip6tnl.c +++ b/ip/link_ip6tnl.c @@ -88,8 +88,8 @@ static int ip6tunnel_parse_opt(struct link_util *lu, int argc, char **argv, struct rtattr *linkinfo[IFLA_INFO_MAX+1]; struct rtattr *iptuninfo[IFLA_IPTUN_MAX + 1]; int len; - struct in6_addr laddr = {}; - struct in6_addr raddr = {}; + struct in6_addr laddr = IN6ADDR_ANY_INIT; + struct in6_addr raddr = IN6ADDR_ANY_INIT; __u8 hop_limit = DEFAULT_TNL_HOP_LIMIT; __u8 encap_limit = IPV6_DEFAULT_TNL_ENCAP_LIMIT; __u32 flowinfo = 0; -- 1.7.10.4