lkml.org 
[lkml]   [2008]   [Mar]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH-RESEND] Removing unneeded statement from tcp_ipv4.c
Ilpo Järvinen schrieb:
> On Mon, 3 Mar 2008, Arnd Hannemann wrote:
>
>> Avoid setting tstamp_ok because this is done two lines later anyway.
>>
>> Signed-off-by: Arnd Hannemann <hannemann@nets.rwth-aachen.de>
>>
>> diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
>> index 00156bf..a28c4c2 100644
>> --- a/net/ipv4/tcp_ipv4.c
>> +++ b/net/ipv4/tcp_ipv4.c
>> @@ -1302,15 +1302,14 @@ int tcp_v4_conn_request(struct sock *sk, struct sk_buff *skb)
>> tmp_opt.saw_tstamp = 0;
>> }
>>
>> - if (tmp_opt.saw_tstamp && !tmp_opt.rcv_tsval) {
>> + if (tmp_opt.saw_tstamp && !tmp_opt.rcv_tsval)
>> /* Some OSes (unknown ones, but I see them on web server, which
>> * contains information interesting only for windows'
>> * users) do not send their stamp in SYN. It is easy case.
>> * We simply do not advertise TS support.
>> */
>> tmp_opt.saw_tstamp = 0;
>> - tmp_opt.tstamp_ok
>
> Please move the comment before the if (), only then can you remove those
> braces safely (without affecting readability, etc.).

Avoid setting tstamp_ok because this is done two lines later anyway.

Signed-off-by: Arnd Hannemann <hannemann@nets.rwth-aachen.de>

diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index 00156bf..ecef356 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -1302,15 +1302,14 @@ int tcp_v4_conn_request(struct sock *sk, struct sk_buff *skb)
tmp_opt.saw_tstamp = 0;
}

- if (tmp_opt.saw_tstamp && !tmp_opt.rcv_tsval) {
- /* Some OSes (unknown ones, but I see them on web server, which
- * contains information interesting only for windows'
- * users) do not send their stamp in SYN. It is easy case.
- * We simply do not advertise TS support.
- */
+ /* Some OSes (unknown ones, but I see them on web server, which
+ * contains information interesting only for windows'
+ * users) do not send their stamp in SYN. It is easy case.
+ * We simply do not advertise TS support.
+ */
+ if (tmp_opt.saw_tstamp && !tmp_opt.rcv_tsval)
tmp_opt.saw_tstamp = 0;
- tmp_opt.tstamp_ok = 0;
- }
+
tmp_opt.tstamp_ok = tmp_opt.saw_tstamp;

tcp_openreq_init(req, &tmp_opt, skb);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2008-03-04 00:19    [W:0.091 / U:11.988 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site