[asterisk-commits] trunk r23466 - /trunk/pbx/pbx_dundi.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Sat Apr 29 21:28:48 MST 2006


Author: russell
Date: Sat Apr 29 23:28:47 2006
New Revision: 23466

URL: http://svn.digium.com/view/asterisk?rev=23466&view=rev
Log:
change a list traversal to use a for loop

Modified:
    trunk/pbx/pbx_dundi.c

Modified: trunk/pbx/pbx_dundi.c
URL: http://svn.digium.com/view/asterisk/trunk/pbx/pbx_dundi.c?rev=23466&r1=23465&r2=23466&view=diff
==============================================================================
--- trunk/pbx/pbx_dundi.c (original)
+++ trunk/pbx/pbx_dundi.c Sat Apr 29 23:28:47 2006
@@ -4199,7 +4199,7 @@
 	if (peer->registerid > -1)
 		ast_sched_del(sched, peer->registerid);
 	peer->registerid = -1;
-	while(v) {
+	for (; v; v = v->next) {
 		if (!strcasecmp(v->name, "inkey")) {
 			ast_copy_string(peer->inkey, v->value, sizeof(peer->inkey));
 		} else if (!strcasecmp(v->name, "outkey")) {
@@ -4281,7 +4281,6 @@
 					v->value, v->lineno);
 			}
 		}
-		v = v->next;
 	}
 	(*globalpcmode) |= peer->pcmodel;
 	if (!peer->model && !peer->pcmodel) {



More information about the asterisk-commits mailing list