net/ipv4/tcp.c: fix min() type mismatch warning

net/ipv4/tcp.c: In function 'do_tcp_setsockopt':
net/ipv4/tcp.c:2050: warning: comparison of distinct pointer types lacks a cast

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Andrew Morton 2009-10-01 15:02:20 -07:00 committed by David S. Miller
parent 28ad3957b9
commit 4fdb78d309
1 changed files with 1 additions and 1 deletions

View File

@ -2047,7 +2047,7 @@ static int do_tcp_setsockopt(struct sock *sk, int level,
return -EINVAL;
val = strncpy_from_user(name, optval,
min(TCP_CA_NAME_MAX-1, optlen));
min_t(long, TCP_CA_NAME_MAX-1, optlen));
if (val < 0)
return -EFAULT;
name[val] = 0;