Skip to content

Commit

Permalink
tipc: Optimize pointer dereferencing when receiving stream data
Browse files Browse the repository at this point in the history
This patch eliminates an unnecessary pointer dereference when
accessing a stream-based socket's receive queue.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Allan Stephens authored and David S. Miller committed Jul 15, 2008
1 parent 0ea5224 commit 8642bd9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/tipc/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -1133,7 +1133,7 @@ static int recv_stream(struct kiocb *iocb, struct socket *sock,
/* Loop around if more data is required */

if ((sz_copied < buf_len) /* didn't get all requested data */
&& (!skb_queue_empty(&sock->sk->sk_receive_queue) ||
&& (!skb_queue_empty(&sk->sk_receive_queue) ||
(flags & MSG_WAITALL))
/* ... and more is ready or required */
&& (!(flags & MSG_PEEK)) /* ... and aren't just peeking at data */
Expand Down

0 comments on commit 8642bd9

Please sign in to comment.