From: Jayachandran C Date: Thu, 13 Oct 2005 18:43:02 +0000 (-0700) Subject: [IPV4]: Remove dead code from ip_output.c X-Git-Tag: v2.6.15-rc1~733^2~5^2~3 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0d0d2bba97cb091218ea0bcb3d8debcc7bf48397;p=linux-2.6 [IPV4]: Remove dead code from ip_output.c skb_prev is assigned from skb, which cannot be NULL. This patch removes the unnecessary NULL check. Signed-off-by: Jayachandran C. Acked-by: James Morris Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index 1ad5202e55..87e350069a 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c @@ -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);