From: Ilpo Järvinen Date: Tue, 7 Oct 2008 21:43:31 +0000 (-0700) Subject: tcp: cleanup messy initializer X-Git-Tag: v2.6.28-rc1~717^2~121 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4a7e56098f06d505f23f8d7c8d6762221065922a;p=profile%2Fivi%2Fkernel-x86-ivi.git tcp: cleanup messy initializer I'm quite sure that if I give this function in its old format for you to inspect, you start to wonder what is the type of demanded or if it's a global variable. Signed-off-by: Ilpo Järvinen Signed-off-by: David S. Miller --- diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index c19f429..63da393 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -4461,8 +4461,8 @@ static void tcp_new_space(struct sock *sk) if (tcp_should_expand_sndbuf(sk)) { int sndmem = max_t(u32, tp->rx_opt.mss_clamp, tp->mss_cache) + - MAX_TCP_HEADER + 16 + sizeof(struct sk_buff), - demanded = max_t(unsigned int, tp->snd_cwnd, + MAX_TCP_HEADER + 16 + sizeof(struct sk_buff); + int demanded = max_t(unsigned int, tp->snd_cwnd, tp->reordering + 1); sndmem *= 2 * demanded; if (sndmem > sk->sk_sndbuf)