Skip to content

Commit

Permalink
[NET]: "wrong timeout value in sk_wait_data()": cleanups
Browse files Browse the repository at this point in the history
- 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>
  • Loading branch information
Andrew Morton authored and David S. Miller committed Jul 11, 2007
1 parent 60f0438 commit 6f11df8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/core/sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,8 @@ static int sock_set_timeout(long *timeo_p, char __user *optval, int optlen)
return -EDOM;

if (tv.tv_sec < 0) {
static int warned = 0;
static int warned __read_mostly;

*timeo_p = 0;
if (warned < 10 && net_ratelimit())
warned++;
Expand Down

0 comments on commit 6f11df8

Please sign in to comment.