diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2007-07-09 16:16:00 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-07-11 01:18:50 -0400 |
commit | 6f11df8355e8f59f7572bf6ac1f63d692483b0c6 (patch) | |
tree | 953a9f37a6aa18e6086bbc346cf61ae38414ac2a /net/core | |
parent | 60f0438a87cfd9f5faa439ca419497cd64e4c59e (diff) |
[NET]: "wrong timeout value in sk_wait_data()": cleanups
- save 4 bytes
- it's read-mostly.
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Vasily Averin <vvs@sw.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/sock.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/core/sock.c b/net/core/sock.c index 252d21a1bb04..091032a250c7 100644 --- a/net/core/sock.c +++ b/net/core/sock.c | |||
@@ -210,7 +210,8 @@ static int sock_set_timeout(long *timeo_p, char __user *optval, int optlen) | |||
210 | return -EDOM; | 210 | return -EDOM; |
211 | 211 | ||
212 | if (tv.tv_sec < 0) { | 212 | if (tv.tv_sec < 0) { |
213 | static int warned = 0; | 213 | static int warned __read_mostly; |
214 | |||
214 | *timeo_p = 0; | 215 | *timeo_p = 0; |
215 | if (warned < 10 && net_ratelimit()) | 216 | if (warned < 10 && net_ratelimit()) |
216 | warned++; | 217 | warned++; |