diff options
author | Allan Stephens <Allan.Stephens@windriver.com> | 2010-12-31 18:59:35 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-01-01 13:57:57 -0800 |
commit | a016892cd6eb8d3dd9769021b088917ac7371abd (patch) | |
tree | 7176a3754a1b26b9a4703984d7a0ccf4e320e4ee /net/tipc/socket.c | |
parent | e3ec9c7d5eea9adf2c604c623c987360cc700b88 (diff) | |
download | op-kernel-dev-a016892cd6eb8d3dd9769021b088917ac7371abd.zip op-kernel-dev-a016892cd6eb8d3dd9769021b088917ac7371abd.tar.gz |
tipc: remove extraneous braces from single statements
Cleans up TIPC's source code to eliminate the presence of unnecessary
use of {} around single statements.
These changes are purely cosmetic and do not alter the operation of TIPC
in any way.
Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/socket.c')
-rw-r--r-- | net/tipc/socket.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/net/tipc/socket.c b/net/tipc/socket.c index 18aad57..2b02a3a 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c @@ -590,9 +590,8 @@ static int send_msg(struct kiocb *iocb, struct socket *sock, m->msg_iov); } if (likely(res != -ELINKCONG)) { - if (needs_conn && (res >= 0)) { + if (needs_conn && (res >= 0)) sock->state = SS_CONNECTING; - } break; } if (m->msg_flags & MSG_DONTWAIT) { @@ -651,9 +650,8 @@ static int send_packet(struct kiocb *iocb, struct socket *sock, } res = tipc_send(tport->ref, m->msg_iovlen, m->msg_iov); - if (likely(res != -ELINKCONG)) { + if (likely(res != -ELINKCONG)) break; - } if (m->msg_flags & MSG_DONTWAIT) { res = -EWOULDBLOCK; break; @@ -1418,9 +1416,8 @@ static int connect(struct socket *sock, struct sockaddr *dest, int destlen, m.msg_name = dest; m.msg_namelen = destlen; res = send_msg(NULL, sock, &m, 0); - if (res < 0) { + if (res < 0) goto exit; - } /* Wait until an 'ACK' or 'RST' arrives, or a timeout occurs */ @@ -1442,11 +1439,10 @@ static int connect(struct socket *sock, struct sockaddr *dest, int destlen, advance_rx_queue(sk); } } else { - if (sock->state == SS_CONNECTED) { + if (sock->state == SS_CONNECTED) res = -EISCONN; - } else { + else res = -ECONNREFUSED; - } } } else { if (res == 0) |