From: Russell Bryant Date: Sun, 30 Apr 2006 04:28:47 +0000 (+0000) Subject: change a list traversal to use a for loop X-Git-Tag: 1.4.0-beta1~1706 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d9fa5f3c898a5585fa83c83f74f82723d5631a8a;p=thirdparty%2Fasterisk.git change a list traversal to use a for loop git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23466 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/pbx/pbx_dundi.c b/pbx/pbx_dundi.c index b80e9995b1..00c04ab1c6 100644 --- a/pbx/pbx_dundi.c +++ b/pbx/pbx_dundi.c @@ -4199,7 +4199,7 @@ static void build_peer(dundi_eid *eid, struct ast_variable *v, int *globalpcmode 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 @@ static void build_peer(dundi_eid *eid, struct ast_variable *v, int *globalpcmode v->value, v->lineno); } } - v = v->next; } (*globalpcmode) |= peer->pcmodel; if (!peer->model && !peer->pcmodel) {