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:
Russell Bryant
2006-01-21 08:01:24 +00:00
parent 0f2a9df6aa
commit 847260bb77
3 changed files with 36 additions and 105 deletions

View File

@@ -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)