Commit 4a7e5609 authored by Ilpo Järvinen's avatar Ilpo Järvinen Committed by David S. Miller

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: default avatarIlpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 33f5f57e
...@@ -4461,8 +4461,8 @@ static void tcp_new_space(struct sock *sk) ...@@ -4461,8 +4461,8 @@ static void tcp_new_space(struct sock *sk)
if (tcp_should_expand_sndbuf(sk)) { if (tcp_should_expand_sndbuf(sk)) {
int sndmem = max_t(u32, tp->rx_opt.mss_clamp, tp->mss_cache) + int sndmem = max_t(u32, tp->rx_opt.mss_clamp, tp->mss_cache) +
MAX_TCP_HEADER + 16 + sizeof(struct sk_buff), MAX_TCP_HEADER + 16 + sizeof(struct sk_buff);
demanded = max_t(unsigned int, tp->snd_cwnd, int demanded = max_t(unsigned int, tp->snd_cwnd,
tp->reordering + 1); tp->reordering + 1);
sndmem *= 2 * demanded; sndmem *= 2 * demanded;
if (sndmem > sk->sk_sndbuf) if (sndmem > sk->sk_sndbuf)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment