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 <lkp@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
David S. Miller 2018-11-17 16:53:46 -08:00
parent f9e06c45cb
commit 6f0271d929

View file

@ -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();