]> err.no Git - linux-2.6/commitdiff
net: Add missing braces to multi-statement if()s
authorIlpo Järvinen <ilpo.jarvinen@helsinki.fi>
Fri, 2 May 2008 23:20:10 +0000 (16:20 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 2 May 2008 23:20:10 +0000 (16:20 -0700)
One finds all kinds of crazy things with some shell pipelining.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/sock.c
net/rxrpc/ar-transport.c

index 5dbb81bc96733d260e97c9c573acde9260b58174..fa76f04fa9c6fd443937702f4f869417bf217c4f 100644 (file)
@@ -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;
index bb282a6a19f0d7e38ac75542296acbf231330e77..64069c8769a51e0ad629d377d79f847dd26a92d7 100644 (file)
@@ -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("");
 }