mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
remove some useless checks of the result of ast_strdupa
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8378 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -329,10 +329,6 @@ static struct agent_pvt *add_agent(char *agent, int pending)
|
||||
struct agent_pvt *p, *prev;
|
||||
|
||||
parse = ast_strdupa(agent);
|
||||
if (!parse) {
|
||||
ast_log(LOG_ERROR, "Out of memory!\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Extract username (agt), password and name from agent (args). */
|
||||
AST_NONSTANDARD_APP_ARGS(args, parse, ',');
|
||||
@@ -1767,11 +1763,7 @@ static int __login_exec(struct ast_channel *chan, void *data, int callbackmode)
|
||||
|
||||
LOCAL_USER_ADD(u);
|
||||
|
||||
if (!(parse = ast_strdupa(data))) {
|
||||
ast_log(LOG_ERROR, "Out of memory!\n");
|
||||
LOCAL_USER_REMOVE(u);
|
||||
return -1;
|
||||
}
|
||||
parse = ast_strdupa(data);
|
||||
|
||||
AST_STANDARD_APP_ARGS(args, parse);
|
||||
|
||||
@@ -2511,10 +2503,6 @@ static char *function_agent(struct ast_channel *chan, char *cmd, char *data, cha
|
||||
}
|
||||
|
||||
item = ast_strdupa(data);
|
||||
if (!item) {
|
||||
ast_log(LOG_ERROR, "Out of memory!\n");
|
||||
return buf;
|
||||
}
|
||||
|
||||
agentid = strsep(&item, ":");
|
||||
if (!item)
|
||||
|
Reference in New Issue
Block a user