* [PATCH] [NET]: Add missing braces to multi-statement if()s
@ 2008-05-02 13:48 Ilpo Järvinen
2008-05-01 20:53 ` Arjan van de Ven
2008-05-02 14:15 ` David Howells
0 siblings, 2 replies; 4+ messages in thread
From: Ilpo Järvinen @ 2008-05-02 13:48 UTC (permalink / raw)
To: David Miller; +Cc: David Howells, Netdev
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1545 bytes --]
One finds all kinds of crazy things with some shell pipelining.
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;
diff --git a/net/rxrpc/ar-transport.c b/net/rxrpc/ar-transport.c
index bb282a6..64069c8 100644
--- a/net/rxrpc/ar-transport.c
+++ b/net/rxrpc/ar-transport.c
@@ -184,12 +184,13 @@ void rxrpc_put_transport(struct rxrpc_transport *trans)
ASSERTCMP(atomic_read(&trans->usage), >, 0);
trans->put_time = get_seconds();
- if (unlikely(atomic_dec_and_test(&trans->usage)))
+ if (unlikely(atomic_dec_and_test(&trans->usage))) {
_debug("zombie");
/* let the reaper determine the timeout to avoid a race with
* overextending the timeout if the reaper is running at the
* same time */
rxrpc_queue_delayed_work(&rxrpc_transport_reap, 0);
+ }
_leave("");
}
--
1.5.2.2
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] [NET]: Add missing braces to multi-statement if()s
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
2008-05-02 14:15 ` David Howells
1 sibling, 0 replies; 4+ messages in thread
From: Arjan van de Ven @ 2008-05-01 20:53 UTC (permalink / raw)
To: Ilpo Järvinen; +Cc: David Miller, David Howells, Netdev
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....
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] [NET]: Add missing braces to multi-statement if()s
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
@ 2008-05-02 14:15 ` David Howells
2008-05-02 23:20 ` David Miller
1 sibling, 1 reply; 4+ messages in thread
From: David Howells @ 2008-05-02 14:15 UTC (permalink / raw)
To: =?ISO-8859-1?Q?Ilpo_J=E4rvinen?=; +Cc: dhowells, David Miller, Netdev
Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> wrote:
> One finds all kinds of crazy things with some shell pipelining.
>
> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
> Cc: David Howells <dhowells@redhat.com>
Acked-by: David Howells <dhowells@redhat.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] [NET]: Add missing braces to multi-statement if()s
2008-05-02 14:15 ` David Howells
@ 2008-05-02 23:20 ` David Miller
0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2008-05-02 23:20 UTC (permalink / raw)
To: dhowells; +Cc: ilpo.jarvinen, netdev
From: David Howells <dhowells@redhat.com>
Date: Fri, 02 May 2008 15:15:36 +0100
> Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> wrote:
>
> > One finds all kinds of crazy things with some shell pipelining.
> >
> > Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
> > Cc: David Howells <dhowells@redhat.com>
>
> Acked-by: David Howells <dhowells@redhat.com>
Applied, good catch :)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-05-02 23:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2008-05-02 14:15 ` David Howells
2008-05-02 23:20 ` David Miller
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).