From 6f0271d92963bc8588ad7058622ec7b1e94852de Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Sat, 17 Nov 2018 16:53:46 -0800 Subject: [PATCH] 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 --- drivers/net/tun.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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(); -- 2.30.2