aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaciej ┼╗enczykowski <maze@google.com>2018-09-29 23:44:54 -0700
committerDavid S. Miller <davem@davemloft.net>2018-10-02 16:12:40 -0700
commit744486d426dce4e4dc25fd2ce750116a0025736c (patch)
treea9a84c3061c4ecfcef0c93aaf7ef75eb76205ee6
parentnet: rtm_to_fib6_config() - use new style struct initializer instead of memset (diff)
downloadlinux-dev-744486d426dce4e4dc25fd2ce750116a0025736c.tar.xz
linux-dev-744486d426dce4e4dc25fd2ce750116a0025736c.zip
net: inet6_rtm_getroute() - use new style struct initializer instead of memset
Signed-off-by: Maciej ┼╗enczykowski <maze@google.com> Reviewed-by: David Ahern <dsahern@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/ipv6/route.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index be5f7a15bc38..6311a7fc5f63 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -4823,7 +4823,7 @@ static int inet6_rtm_getroute(struct sk_buff *in_skb, struct nlmsghdr *nlh,
struct rt6_info *rt;
struct sk_buff *skb;
struct rtmsg *rtm;
- struct flowi6 fl6;
+ struct flowi6 fl6 = {};
bool fibmatch;
err = nlmsg_parse(nlh, sizeof(*rtm), tb, RTA_MAX, rtm_ipv6_policy,
@@ -4832,7 +4832,6 @@ static int inet6_rtm_getroute(struct sk_buff *in_skb, struct nlmsghdr *nlh,
goto errout;
err = -EINVAL;
- memset(&fl6, 0, sizeof(fl6));
rtm = nlmsg_data(nlh);
fl6.flowlabel = ip6_make_flowinfo(rtm->rtm_tos, 0);
fibmatch = !!(rtm->rtm_flags & RTM_F_FIB_MATCH);