Commit b89741a0 authored by Allan Stephens's avatar Allan Stephens Committed by David S. Miller

[TIPC]: Cosmetic changes to TIPC connect() code

This patch fixes TIPC's connect routine to conform to Linux
kernel style norms of indentation, line length, etc.
Signed-off-by: default avatarAllan Stephens <allan.stephens@windriver.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4934c69a
......@@ -1255,7 +1255,7 @@ static int connect(struct socket *sock, struct sockaddr *dest, int destlen,
struct tipc_msg *msg;
int res;
/* For now, TIPC does not allow use of connect() with DGRAM or RDM types */
/* For now, TIPC does not allow use of connect() with DGRAM/RDM types */
if (sock->state == SS_READY)
return -EOPNOTSUPP;
......@@ -1288,7 +1288,8 @@ static int connect(struct socket *sock, struct sockaddr *dest, int destlen,
m.msg_name = dest;
m.msg_namelen = destlen;
if ((res = send_msg(NULL, sock, &m, 0)) < 0) {
res = send_msg(NULL, sock, &m, 0);
if (res < 0) {
sock->state = SS_DISCONNECTING;
return res;
}
......@@ -1310,10 +1311,10 @@ static int connect(struct socket *sock, struct sockaddr *dest, int destlen,
advance_queue(tsock);
}
} else {
if (res == 0) {
if (res == 0)
res = -ETIMEDOUT;
} else
{ /* leave "res" unchanged */ }
else
; /* leave "res" unchanged */
sock->state = SS_DISCONNECTING;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment