aboutsummaryrefslogtreecommitdiffstats
path: root/pbx/pbx_dundi.c
diff options
context:
space:
mode:
Diffstat (limited to 'pbx/pbx_dundi.c')
-rw-r--r--pbx/pbx_dundi.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/pbx/pbx_dundi.c b/pbx/pbx_dundi.c
index ab9ba94db..044ddc4b2 100644
--- a/pbx/pbx_dundi.c
+++ b/pbx/pbx_dundi.c
@@ -559,10 +559,8 @@ static int dundi_lookup_local(struct dundi_result *dr, struct dundi_mapping *map
newvariable = ast_var_assign("IPADDR", ipaddr);
AST_LIST_INSERT_HEAD(&headp, newvariable, entries);
pbx_substitute_variables_varshead(&headp, map->dest, dr[anscnt].dest, sizeof(dr[anscnt].dest));
- while (!AST_LIST_EMPTY(&headp)) { /* List Deletion. */
- newvariable = AST_LIST_REMOVE_HEAD(&headp, entries);
+ while ((newvariable = AST_LIST_REMOVE_HEAD(&headp, entries)))
ast_var_delete(newvariable);
- }
} else
dr[anscnt].dest[0] = '\0';
anscnt++;