ppp: Use skb_queue_walk() in ppp_mp_insert().
authorDavid S. Miller <davem@davemloft.net>
Thu, 9 Oct 2008 23:40:29 +0000 (16:40 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 9 Oct 2008 23:40:29 +0000 (16:40 -0700)
Instead of open-coded version.

Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ppp_generic.c

index 5d4d21516a6c0824224d89f4d814989ad4935227..0ca0fcbb7c01f5dcb1f840dd31ca24d1696a83e6 100644 (file)
@@ -1863,9 +1863,10 @@ ppp_mp_insert(struct ppp *ppp, struct sk_buff *skb)
 
        /* N.B. we don't need to lock the list lock because we have the
           ppp unit receive-side lock. */
-       for (p = list->next; p != (struct sk_buff *)list; p = p->next)
+       skb_queue_walk(list, p) {
                if (seq_before(seq, p->sequence))
                        break;
+       }
        __skb_queue_before(list, p, skb);
 }