Commit 453269c5 authored by David S. Miller's avatar David S. Miller

[TUN]: Make type explicit in min() usage.

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 430c4e0f
...@@ -365,7 +365,8 @@ static ssize_t tun_chr_readv(struct file *file, const struct iovec *iv, ...@@ -365,7 +365,8 @@ static ssize_t tun_chr_readv(struct file *file, const struct iovec *iv,
* - we are multicast promiscous. * - we are multicast promiscous.
* - we belong to the multicast group. * - we belong to the multicast group.
*/ */
memcpy(addr, skb->data, min(sizeof addr, skb->len)); memcpy(addr, skb->data,
min_t(size_t, sizeof addr, skb->len));
bit_nr = ether_crc(sizeof addr, addr) >> 26; bit_nr = ether_crc(sizeof addr, addr) >> 26;
if ((tun->if_flags & IFF_PROMISC) || if ((tun->if_flags & IFF_PROMISC) ||
memcmp(addr, tun->dev_addr, sizeof addr) == 0 || memcmp(addr, tun->dev_addr, sizeof addr) == 0 ||
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment