From: David S. Miller Date: Sun, 18 Nov 2018 00:53:46 +0000 (-0800) Subject: tun: Adjust on-stack tun_page initialization. X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=6f0271d92963bc8588ad7058622ec7b1e94852de;p=openwrt%2Fstaging%2Fblogic.git tun: Adjust on-stack tun_page initialization. Instead of constantly playing with the struct initializer syntax trying to make gcc and CLang both happy, just clear it out using memset(). >> drivers/net/tun.c:2503:42: warning: Using plain integer as NULL pointer Reported-by: kbuild test robot Signed-off-by: David S. Miller --- diff --git a/drivers/net/tun.c b/drivers/net/tun.c index e90a7923a5f6..36163a147d39 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -2500,10 +2500,12 @@ static int tun_sendmsg(struct socket *sock, struct msghdr *m, size_t total_len) return -EBADFD; if (ctl && (ctl->type == TUN_MSG_PTR)) { - struct tun_page tpage = {0}; + struct tun_page tpage; int n = ctl->num; int flush = 0; + memset(&tpage, 0, sizeof(tpage)); + local_bh_disable(); rcu_read_lock();