netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Use skb_queue_purge
@ 2005-03-16  8:34 Ralf Baechle DL5RB
  2005-03-16 22:15 ` David S. Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Ralf Baechle DL5RB @ 2005-03-16  8:34 UTC (permalink / raw)
  To: netdev, linux-hams; +Cc: David S. Miller

skb_queue_purge exists so why not using it ;-)

Index: bk-afu/net/ax25/af_ax25.c
===================================================================
--- bk-afu.orig/net/ax25/af_ax25.c	2005-03-15 23:26:35.678081272 +0000
+++ bk-afu/net/ax25/af_ax25.c	2005-03-15 23:38:31.979186952 +0000
@@ -306,9 +306,7 @@
 
 			kfree_skb(skb);
 		}
-		while ((skb = skb_dequeue(&ax25->sk->sk_write_queue)) != NULL) {
-			kfree_skb(skb);
-		}
+		skb_queue_purge(&ax25->sk->sk_write_queue);
 	}
 
 	if (ax25->sk != NULL) {

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-03-16 22:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-16  8:34 [PATCH] Use skb_queue_purge Ralf Baechle DL5RB
2005-03-16 22:15 ` David S. Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).