aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/socket.c
diff options
context:
space:
mode:
authorAllan Stephens <Allan.Stephens@windriver.com>2010-12-31 13:59:35 -0500
committerDavid S. Miller <davem@davemloft.net>2011-01-01 16:57:57 -0500
commita016892cd6eb8d3dd9769021b088917ac7371abd (patch)
tree7176a3754a1b26b9a4703984d7a0ccf4e320e4ee /net/tipc/socket.c
parente3ec9c7d5eea9adf2c604c623c987360cc700b88 (diff)
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.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/net/tipc/socket.c b/net/tipc/socket.c
index 18aad573f551..2b02a3a80313 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,
590 m->msg_iov); 590 m->msg_iov);
591 } 591 }
592 if (likely(res != -ELINKCONG)) { 592 if (likely(res != -ELINKCONG)) {
593 if (needs_conn && (res >= 0)) { 593 if (needs_conn && (res >= 0))
594 sock->state = SS_CONNECTING; 594 sock->state = SS_CONNECTING;
595 }
596 break; 595 break;
597 } 596 }
598 if (m->msg_flags & MSG_DONTWAIT) { 597 if (m->msg_flags & MSG_DONTWAIT) {
@@ -651,9 +650,8 @@ static int send_packet(struct kiocb *iocb, struct socket *sock,
651 } 650 }
652 651
653 res = tipc_send(tport->ref, m->msg_iovlen, m->msg_iov); 652 res = tipc_send(tport->ref, m->msg_iovlen, m->msg_iov);
654 if (likely(res != -ELINKCONG)) { 653 if (likely(res != -ELINKCONG))
655 break; 654 break;
656 }
657 if (m->msg_flags & MSG_DONTWAIT) { 655 if (m->msg_flags & MSG_DONTWAIT) {
658 res = -EWOULDBLOCK; 656 res = -EWOULDBLOCK;
659 break; 657 break;
@@ -1418,9 +1416,8 @@ static int connect(struct socket *sock, struct sockaddr *dest, int destlen,
1418 m.msg_name = dest; 1416 m.msg_name = dest;
1419 m.msg_namelen = destlen; 1417 m.msg_namelen = destlen;
1420 res = send_msg(NULL, sock, &m, 0); 1418 res = send_msg(NULL, sock, &m, 0);
1421 if (res < 0) { 1419 if (res < 0)
1422 goto exit; 1420 goto exit;
1423 }
1424 1421
1425 /* Wait until an 'ACK' or 'RST' arrives, or a timeout occurs */ 1422 /* Wait until an 'ACK' or 'RST' arrives, or a timeout occurs */
1426 1423
@@ -1442,11 +1439,10 @@ static int connect(struct socket *sock, struct sockaddr *dest, int destlen,
1442 advance_rx_queue(sk); 1439 advance_rx_queue(sk);
1443 } 1440 }
1444 } else { 1441 } else {
1445 if (sock->state == SS_CONNECTED) { 1442 if (sock->state == SS_CONNECTED)
1446 res = -EISCONN; 1443 res = -EISCONN;
1447 } else { 1444 else
1448 res = -ECONNREFUSED; 1445 res = -ECONNREFUSED;
1449 }
1450 } 1446 }
1451 } else { 1447 } else {
1452 if (res == 0) 1448 if (res == 0)