[IPV4]: Remove dead code from ip_output.c
authorJayachandran C <jchandra@digeo.com>
Thu, 13 Oct 2005 18:43:02 +0000 (11:43 -0700)
committerArnaldo Carvalho de Melo <acme@mandriva.com>
Wed, 26 Oct 2005 02:58:54 +0000 (00:58 -0200)
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>
net/ipv4/ip_output.c

index 1ad5202e556b5d1862f5c0b1c9895c45e81e4c04..87e350069abb1cf8a2654bb652c609a4a429cb96 100644 (file)
@@ -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);