diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2009-10-01 18:02:20 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-10-01 18:02:20 -0400 |
commit | 4fdb78d3093a347456e108b77d56d493d29071b2 (patch) | |
tree | 2ad6dc10dc3603d40caaa26fbdb6684f30987a4e | |
parent | 28ad3957b913855e8d41a27f7b90bed944809625 (diff) |
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>
-rw-r--r-- | net/ipv4/tcp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 5a15e7629d8e..7bb8479b1eaf 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c | |||
@@ -2047,7 +2047,7 @@ static int do_tcp_setsockopt(struct sock *sk, int level, | |||
2047 | return -EINVAL; | 2047 | return -EINVAL; |
2048 | 2048 | ||
2049 | val = strncpy_from_user(name, optval, | 2049 | val = strncpy_from_user(name, optval, |
2050 | min(TCP_CA_NAME_MAX-1, optlen)); | 2050 | min_t(long, TCP_CA_NAME_MAX-1, optlen)); |
2051 | if (val < 0) | 2051 | if (val < 0) |
2052 | return -EFAULT; | 2052 | return -EFAULT; |
2053 | name[val] = 0; | 2053 | name[val] = 0; |