Skip to content

Commit

Permalink
[IPV4]: Remove dead code from ip_output.c
Browse files Browse the repository at this point in the history
skb_prev is assigned from skb, which cannot be NULL. This patch removes the
unnecessary NULL check.

Signed-off-by: Jayachandran C. <c.jayachandran at gmail.com>
Acked-by: James Morris <jmorris@namei.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
  • Loading branch information
Jayachandran C authored and Arnaldo Carvalho de Melo committed Oct 26, 2005
1 parent ea7ce40 commit 0d0d2bb
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions net/ipv4/ip_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -1023,10 +1023,7 @@ ssize_t ip_append_page(struct sock *sk, struct page *page,
int alloclen;

skb_prev = skb;
if (skb_prev)
fraggap = skb_prev->len - maxfraglen;
else
fraggap = 0;
fraggap = skb_prev->len - maxfraglen;

alloclen = fragheaderlen + hh_len + fraggap + 15;
skb = sock_wmalloc(sk, alloclen, 1, sk->sk_allocation);
Expand Down

0 comments on commit 0d0d2bb

Please sign in to comment.