aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-12-08 23:07:54 -0500
committerDavid S. Miller <davem@davemloft.net>2009-12-08 23:07:54 -0500
commit3dc789320e1b310cb505dcd94512c279abcd5e1c (patch)
treeb6173953ccff6c9bfd83096c97027c2d338287d1 /net/ipv4/tcp.c
parente61444d9209821469ed0d5a9128dcf2e494533ea (diff)
tcp: Remove runtime check that can never be true.
GCC even warns about it, as reported by Andrew Morton: net/ipv4/tcp.c: In function 'do_tcp_getsockopt': net/ipv4/tcp.c:2544: warning: comparison is always false due to limited range of data type Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp.c')
-rw-r--r--net/ipv4/tcp.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index c8666b70cde0..b0a26bb25e2e 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -2540,11 +2540,6 @@ static int do_tcp_getsockopt(struct sock *sk, int level,
2540 ctd.tcpct_cookie_desired = cvp->cookie_desired; 2540 ctd.tcpct_cookie_desired = cvp->cookie_desired;
2541 ctd.tcpct_s_data_desired = cvp->s_data_desired; 2541 ctd.tcpct_s_data_desired = cvp->s_data_desired;
2542 2542
2543 /* Cookie(s) saved, return as nonce */
2544 if (sizeof(ctd.tcpct_value) < cvp->cookie_pair_size) {
2545 /* impossible? */
2546 return -EINVAL;
2547 }
2548 memcpy(&ctd.tcpct_value[0], &cvp->cookie_pair[0], 2543 memcpy(&ctd.tcpct_value[0], &cvp->cookie_pair[0],
2549 cvp->cookie_pair_size); 2544 cvp->cookie_pair_size);
2550 ctd.tcpct_used = cvp->cookie_pair_size; 2545 ctd.tcpct_used = cvp->cookie_pair_size;