mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
immediately handle ast_strdupa result so that one more level of indentation
can be removed from this function git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23490 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -3984,8 +3984,10 @@ static void build_mapping(char *name, char *value)
|
||||
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 @@ static void build_mapping(char *name, char *value)
|
||||
}
|
||||
} 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 */
|
||||
|
Reference in New Issue
Block a user