diff options
author | Allan Stephens <allan.stephens@windriver.com> | 2006-06-25 23:48:22 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-06-25 23:48:22 -0700 |
commit | a3b0a5a9d004002a9cf9cf7a9d10cf1447a73d2b (patch) | |
tree | dab990b30b9c5d677c9c3408c2f8e73a5e50db72 /net/tipc/socket.c | |
parent | 4b087b28a629cc9388e42fdccdcd929deaa7ac81 (diff) | |
download | kernel-crypto-a3b0a5a9d004002a9cf9cf7a9d10cf1447a73d2b.tar.gz kernel-crypto-a3b0a5a9d004002a9cf9cf7a9d10cf1447a73d2b.tar.xz kernel-crypto-a3b0a5a9d004002a9cf9cf7a9d10cf1447a73d2b.zip |
[TIPC]: Simplify code for returning partial success of stream send request.
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Per Liden <per.liden@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/socket.c')
-rw-r--r-- | net/tipc/socket.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/tipc/socket.c b/net/tipc/socket.c index abecf2d422f..6d4d2b0063a 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c @@ -969,7 +969,7 @@ static int recv_stream(struct kiocb *iocb, struct socket *sock, restart: if (unlikely((skb_queue_len(&sock->sk->sk_receive_queue) == 0) && (flags & MSG_DONTWAIT))) { - res = (sz_copied == 0) ? -EWOULDBLOCK : 0; + res = -EWOULDBLOCK; goto exit; } @@ -1060,7 +1060,7 @@ restart: exit: up(&tsock->sem); - return res ? res : sz_copied; + return sz_copied ? sz_copied : res; } /** |