提交 b89741a0 编写于 作者: A Allan Stephens 提交者: 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: NAllan Stephens <allan.stephens@windriver.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册