Patchwork : ppp: Use skb_queue_walk() in ppp_mp_insert().

login
register
mail settings
Submitter David Miller
Date Oct. 9, 2008, 11:40 p.m.
Message ID <20081009.164054.145614629.davem@davemloft.net>
Download mbox | patch
Permalink /patch/3648/
State Accepted
Delegated to: David Miller
Headers show

Comments

David Miller - Oct. 9, 2008, 11:40 p.m.
ppp: Use skb_queue_walk() in ppp_mp_insert().

Instead of open-coded version.

Signed-off-by: David S. Miller <davem@davemloft.net>
---
 drivers/net/ppp_generic.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

Patch

diff --git a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c
index 5d4d215..0ca0fcb 100644
--- a/drivers/net/ppp_generic.c
+++ b/drivers/net/ppp_generic.c
@@ -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);
 }