[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080501135324.58eddc3f@infradead.org>
Date: Thu, 1 May 2008 13:53:24 -0700
From: Arjan van de Ven <arjan@...radead.org>
To: "Ilpo Järvinen" <ilpo.jarvinen@...sinki.fi>
Cc: David Miller <davem@...emloft.net>,
David Howells <dhowells@...hat.com>,
Netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH] [NET]: Add missing braces to multi-statement if()s
On Fri, 2 May 2008 16:48:35 +0300 (EEST)
"Ilpo Järvinen" <ilpo.jarvinen@...sinki.fi> wrote:
>
> One finds all kinds of crazy things with some shell pipelining.
nice catches!
>
> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@...sinki.fi>
> Cc: David Howells <dhowells@...hat.com>
> ---
> net/core/sock.c | 3 ++-
> net/rxrpc/ar-transport.c | 3 ++-
> 2 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/net/core/sock.c b/net/core/sock.c
> index 5dbb81b..fa76f04 100644
> --- a/net/core/sock.c
> +++ b/net/core/sock.c
> @@ -228,11 +228,12 @@ static int sock_set_timeout(long *timeo_p, char
> __user *optval, int optlen) static int warned __read_mostly;
>
> *timeo_p = 0;
> - if (warned < 10 && net_ratelimit())
> + if (warned < 10 && net_ratelimit()) {
> warned++;
> printk(KERN_INFO "sock_set_timeout:
> `%s' (pid %d) " "tries to set negative timeout\n",
> current->comm, task_pid_nr(current));
> + }
> return 0;
> }
> *timeo_p = MAX_SCHEDULE_TIMEOUT;
>
>
oh my kingdom for a WARN_ON_ONCE() that acts like printk after the
first parameter....
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists