[zaptel-commits] kpfleming: branch mogorman/zaptel-1.2-transcoder r2029 - /team/mogorman/zapte...

zaptel-commits at lists.digium.com zaptel-commits at lists.digium.com
Tue Jan 30 15:28:41 MST 2007


Author: kpfleming
Date: Tue Jan 30 16:28:40 2007
New Revision: 2029

URL: http://svn.digium.com/view/zaptel?view=rev&rev=2029
Log:
use a traversal macro to empty the lists instead of trying to do it manually

Modified:
    team/mogorman/zaptel-1.2-transcoder/wctc4xxp/base.c

Modified: team/mogorman/zaptel-1.2-transcoder/wctc4xxp/base.c
URL: http://svn.digium.com/view/zaptel/team/mogorman/zaptel-1.2-transcoder/wctc4xxp/base.c?view=diff&rev=2029&r1=2028&r2=2029
==============================================================================
--- team/mogorman/zaptel-1.2-transcoder/wctc4xxp/base.c (original)
+++ team/mogorman/zaptel-1.2-transcoder/wctc4xxp/base.c Tue Jan 30 16:28:40 2007
@@ -1587,16 +1587,16 @@
 
 static void release(struct wcdte *wc)
 {
-	struct cmdq *cmdq;
+	struct cmdq *cmdq, *next;
 
 	if (wc->freeregion)
 		release_region(wc->iobase, 0xff);
-	while ((cmdq = list_entry(wc->pending_cmdq.next, struct cmdq, list))) {
+	list_for_each_entry_safe(cmdq, next, &wc->pending_cmdq, list) {
 		debug_printk(1, "freeing cmdq entry at '%p'\n", cmdq);
 		list_del(&cmdq->list);
 		kfree(cmdq);
 	}
-	while ((cmdq = list_entry(wc->free_cmdq.next, struct cmdq, list))) {
+	list_for_each_entry_safe(cmdq, next, &wc->free_cmdq, list) {
 		debug_printk(1, "freeing cmdq entry at '%p'\n", cmdq);
 		list_del(&cmdq->list);
 		kfree(cmdq);



More information about the zaptel-commits mailing list