diff options
-rw-r--r-- | include/net/tcp.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h index e614ad4d613e..582e3772c0d9 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -1248,9 +1248,11 @@ void tcp_select_initial_window(int __space, __u32 mss, __u32 *rcv_wnd, static inline int tcp_win_from_space(int space) { - return sysctl_tcp_adv_win_scale<=0 ? - (space>>(-sysctl_tcp_adv_win_scale)) : - space - (space>>sysctl_tcp_adv_win_scale); + int tcp_adv_win_scale = sysctl_tcp_adv_win_scale; + + return tcp_adv_win_scale <= 0 ? + (space>>(-tcp_adv_win_scale)) : + space - (space>>tcp_adv_win_scale); } /* Note: caller must be prepared to deal with negative returns */ |