[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: Allan Stephens <allan.stephens@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
4934c69a38
commit
b89741a0cc
@@ -1255,7 +1255,7 @@ static int connect(struct socket *sock, struct sockaddr *dest, int destlen,
|
|||||||
struct tipc_msg *msg;
|
struct tipc_msg *msg;
|
||||||
int res;
|
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)
|
if (sock->state == SS_READY)
|
||||||
return -EOPNOTSUPP;
|
return -EOPNOTSUPP;
|
||||||
@@ -1288,7 +1288,8 @@ static int connect(struct socket *sock, struct sockaddr *dest, int destlen,
|
|||||||
|
|
||||||
m.msg_name = dest;
|
m.msg_name = dest;
|
||||||
m.msg_namelen = destlen;
|
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;
|
sock->state = SS_DISCONNECTING;
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
@@ -1310,10 +1311,10 @@ static int connect(struct socket *sock, struct sockaddr *dest, int destlen,
|
|||||||
advance_queue(tsock);
|
advance_queue(tsock);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (res == 0) {
|
if (res == 0)
|
||||||
res = -ETIMEDOUT;
|
res = -ETIMEDOUT;
|
||||||
} else
|
else
|
||||||
{ /* leave "res" unchanged */ }
|
; /* leave "res" unchanged */
|
||||||
sock->state = SS_DISCONNECTING;
|
sock->state = SS_DISCONNECTING;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user