Skip to content

Commit

Permalink
tcp: in sendmsg/pages open code the real goto target
Browse files Browse the repository at this point in the history
copied was assigned zero right before the goto, so if (copied)
cannot ever be true.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Ilpo Järvinen authored and David S. Miller committed Mar 2, 2009
1 parent cabeccb commit 0d6a775
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/ipv4/tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ static ssize_t do_tcp_sendpages(struct sock *sk, struct page **pages, int poffse

err = -EPIPE;
if (sk->sk_err || (sk->sk_shutdown & SEND_SHUTDOWN))
goto do_error;
goto out_err;

while (psize > 0) {
struct sk_buff *skb = tcp_write_queue_tail(sk);
Expand Down Expand Up @@ -854,7 +854,7 @@ int tcp_sendmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg,

err = -EPIPE;
if (sk->sk_err || (sk->sk_shutdown & SEND_SHUTDOWN))
goto do_error;
goto out_err;

while (--iovlen >= 0) {
int seglen = iov->iov_len;
Expand Down

0 comments on commit 0d6a775

Please sign in to comment.