From: Maciej Żenczykowski Date: Sun, 30 Sep 2018 06:44:47 +0000 (-0700) Subject: net: inet_rtm_getroute() - use new style struct initializer instead of memset X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=e8e3fbe92c49d1e031eca72542956606c43122ba;p=openwrt%2Fstaging%2Fblogic.git net: inet_rtm_getroute() - use new style struct initializer instead of memset Signed-off-by: Maciej Żenczykowski Reviewed-by: David Ahern Signed-off-by: David S. Miller --- diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 02482b71498b..048919713f4e 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c @@ -2780,7 +2780,7 @@ static int inet_rtm_getroute(struct sk_buff *in_skb, struct nlmsghdr *nlh, struct rtable *rt = NULL; struct sk_buff *skb; struct rtmsg *rtm; - struct flowi4 fl4; + struct flowi4 fl4 = {}; __be32 dst = 0; __be32 src = 0; kuid_t uid; @@ -2820,7 +2820,6 @@ static int inet_rtm_getroute(struct sk_buff *in_skb, struct nlmsghdr *nlh, if (!skb) return -ENOBUFS; - memset(&fl4, 0, sizeof(fl4)); fl4.daddr = dst; fl4.saddr = src; fl4.flowi4_tos = rtm->rtm_tos;