[asterisk-commits] trunk r23490 - /trunk/pbx/pbx_dundi.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Sat Apr 29 22:07:53 MST 2006
Author: russell
Date: Sun Apr 30 00:07:52 2006
New Revision: 23490
URL: http://svn.digium.com/view/asterisk?rev=23490&view=rev
Log:
immediately handle ast_strdupa result so that one more level of indentation
can be removed from this function
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=23490&r1=23489&r2=23490&view=diff
==============================================================================
--- trunk/pbx/pbx_dundi.c (original)
+++ trunk/pbx/pbx_dundi.c Sun Apr 30 00:07:52 2006
@@ -3984,8 +3984,10 @@
struct dundi_mapping *map;
int x;
int y;
- t = ast_strdupa(value);
- if (t) {
+
+ if (!(t = ast_strdupa(value)))
+ return;
+
AST_LIST_TRAVERSE(&mappings, map, list) {
/* Find a double match */
if (!strcasecmp(map->dcontext, name) &&
@@ -4044,7 +4046,6 @@
}
} else
ast_log(LOG_WARNING, "Expected at least %d arguments in map, but got only %d\n", 4, x);
- }
}
/* \note Called with the peers list already locked */
More information about the asterisk-commits
mailing list