]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[TCP]: Remove local variable and use packets_in_flight directly
authorIlpo Järvinen <ilpo.jarvinen@helsinki.fi>
Sat, 1 Dec 2007 22:48:01 +0000 (00:48 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jan 2008 22:55:43 +0000 (14:55 -0800)
Lines won't be that long and it's compiler's job to optimize
them.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_output.c

index c2aa4688dae63534e86d42ee8a7291ba1615e768..b41176f380d7e3f8bf400338519d282b4b7bb492 100644 (file)
@@ -1293,7 +1293,6 @@ static int tcp_mtu_probe(struct sock *sk)
        int len;
        int probe_size;
        int size_needed;
-       unsigned int pif;
        int copy;
        int mss_now;
 
@@ -1326,11 +1325,9 @@ static int tcp_mtu_probe(struct sock *sk)
        if (after(tp->snd_nxt + size_needed, tp->snd_una + tp->snd_wnd))
                return 0;
 
-       /* Do we need to wait to drain cwnd? */
-       pif = tcp_packets_in_flight(tp);
-       if (pif + 2 > tp->snd_cwnd) {
-               /* With no packets in flight, don't stall. */
-               if (pif == 0)
+       /* Do we need to wait to drain cwnd? With none in flight, don't stall */
+       if (tcp_packets_in_flight(tp) + 2 > tp->snd_cwnd) {
+               if (!tcp_packets_in_flight(tp))
                        return -1;
                else
                        return 0;