Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6f0271d9 authored by David S. Miller's avatar David S. Miller
Browse files

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: default avatarkbuild test robot <lkp@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f9e06c45
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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();