patch-2.4.6 linux/net/ax25/ax25_subr.c
Next file: linux/net/bluetooth/Config.in
Previous file: linux/net/ax25/ax25_ip.c
Back to the patch index
Back to the overall index
- Lines: 24
- Date:
Fri Jun 29 19:38:26 2001
- Orig file:
v2.4.5/linux/net/ax25/ax25_subr.c
- Orig date:
Fri Dec 29 14:35:47 2000
diff -u --recursive --new-file v2.4.5/linux/net/ax25/ax25_subr.c linux/net/ax25/ax25_subr.c
@@ -59,19 +59,10 @@
*/
void ax25_clear_queues(ax25_cb *ax25)
{
- struct sk_buff *skb;
-
- while ((skb = skb_dequeue(&ax25->write_queue)) != NULL)
- kfree_skb(skb);
-
- while ((skb = skb_dequeue(&ax25->ack_queue)) != NULL)
- kfree_skb(skb);
-
- while ((skb = skb_dequeue(&ax25->reseq_queue)) != NULL)
- kfree_skb(skb);
-
- while ((skb = skb_dequeue(&ax25->frag_queue)) != NULL)
- kfree_skb(skb);
+ skb_queue_purge(&ax25->write_queue);
+ skb_queue_purge(&ax25->ack_queue);
+ skb_queue_purge(&ax25->reseq_queue);
+ skb_queue_purge(&ax25->frag_queue);
}
/*
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)