]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
net: inet6_rtm_getroute() - use new style struct initializer instead of memset
authorMaciej Żenczykowski <maze@google.com>
Sun, 30 Sep 2018 06:44:54 +0000 (23:44 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 2 Oct 2018 23:12:40 +0000 (16:12 -0700)
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Reviewed-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/route.c

index be5f7a15bc38dc3ac2a80899c69c5e56516cf7b6..6311a7fc5f63532ce14ebdc71353378f63fc76b6 100644 (file)
@@ -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);