提交 b0555976 编写于 作者: W wangweidong 提交者: David S. Miller

tipc: make the code look more readable

In commit 3b8401fe ("tipc: kill unnecessary goto's") didn't make
the code look most readable, so fix it. This patch is cosmetic
and does not change the operation of TIPC in any way.
Suggested-by: NDavid Laight <David.Laight@ACULAB.COM>
Signed-off-by: NWang Weidong <wangweidong1@huawei.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 fbe4d456
...@@ -751,13 +751,10 @@ static int send_stream(struct kiocb *iocb, struct socket *sock, ...@@ -751,13 +751,10 @@ static int send_stream(struct kiocb *iocb, struct socket *sock,
/* Handle special cases where there is no connection */ /* Handle special cases where there is no connection */
if (unlikely(sock->state != SS_CONNECTED)) { if (unlikely(sock->state != SS_CONNECTED)) {
res = -ENOTCONN;
if (sock->state == SS_UNCONNECTED) if (sock->state == SS_UNCONNECTED)
res = send_packet(NULL, sock, m, total_len); res = send_packet(NULL, sock, m, total_len);
else if (sock->state == SS_DISCONNECTING) else
res = -EPIPE; res = sock->state == SS_DISCONNECTING ? -EPIPE : -ENOTCONN;
goto exit; goto exit;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册