Skip to content

Commit

Permalink
net: Add missing braces to multi-statement if()s
Browse files Browse the repository at this point in the history
One finds all kinds of crazy things with some shell pipelining.

Signed-off-by: Ilpo Järvinen <[email protected]>
Acked-by: David Howells <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
ij1 authored and davem330 committed May 2, 2008
1 parent 78e92b9 commit 50aab54
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion net/core/sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion net/rxrpc/ar-transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -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("");
}

Expand Down

0 comments on commit 50aab54

Please sign in to comment.