netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arjan van de Ven <arjan@infradead.org>
To: "Ilpo Järvinen" <ilpo.jarvinen@helsinki.fi>
Cc: David Miller <davem@davemloft.net>,
	David Howells <dhowells@redhat.com>,
	Netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH] [NET]: Add missing braces to multi-statement if()s
Date: Thu, 1 May 2008 13:53:24 -0700	[thread overview]
Message-ID: <20080501135324.58eddc3f@infradead.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0805021646000.30402@wrl-59.cs.helsinki.fi>

On Fri, 2 May 2008 16:48:35 +0300 (EEST)
"Ilpo Järvinen" <ilpo.jarvinen@helsinki.fi> wrote:

> 
> One finds all kinds of crazy things with some shell pipelining.

nice catches!

> 
> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
> Cc: David Howells <dhowells@redhat.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....

  reply	other threads:[~2008-05-02 18:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-02 13:48 [PATCH] [NET]: Add missing braces to multi-statement if()s Ilpo Järvinen
2008-05-01 20:53 ` Arjan van de Ven [this message]
2008-05-02 14:15 ` David Howells
2008-05-02 23:20   ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080501135324.58eddc3f@infradead.org \
    --to=arjan@infradead.org \
    --cc=davem@davemloft.net \
    --cc=dhowells@redhat.com \
    --cc=ilpo.jarvinen@helsinki.fi \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).