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

Commit 4ffa8701 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller
Browse files

can: avoids a false warning



At this point optlen == sizeof(sfilter) but some compilers are dumb.

Reported-by: default avatarNémeth Márton <nm127@freemail.h>
Signed-off-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
Acked-by: default avatarOliver Hartkopp <oliver@hartkopp.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent dac87619
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -445,7 +445,7 @@ static int raw_setsockopt(struct socket *sock, int level, int optname,
				return -EFAULT;
			}
		} else if (count == 1) {
			if (copy_from_user(&sfilter, optval, optlen))
			if (copy_from_user(&sfilter, optval, sizeof(sfilter)))
				return -EFAULT;
		}