diff options
author | Russell Bryant <russell@russellbryant.com> | 2006-01-21 08:23:57 +0000 |
---|---|---|
committer | Russell Bryant <russell@russellbryant.com> | 2006-01-21 08:23:57 +0000 |
commit | 24999261956367679ceaca57d626a113ebaecfc5 (patch) | |
tree | b0fea2b4484b1f7615ba81fc59cc83d6c8368b3e /funcs/func_logic.c | |
parent | 7ad681adc8d5e616165b4d3e6750f2995e782d57 (diff) |
remove useless checks of the result of ast_strdupa
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8380 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'funcs/func_logic.c')
-rw-r--r-- | funcs/func_logic.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/funcs/func_logic.c b/funcs/func_logic.c index d1d96abf3..5f324c634 100644 --- a/funcs/func_logic.c +++ b/funcs/func_logic.c @@ -55,10 +55,7 @@ static char *builtin_function_iftime(struct ast_channel *chan, char *cmd, char * char *iftrue; char *iffalse; - if (!(data = ast_strdupa(data))) { - ast_log(LOG_WARNING, "Memory Error!\n"); - return NULL; - } + data = ast_strdupa(data); data = ast_strip_quoted(data, "\"", "\""); expr = strsep(&data, "?"); @@ -95,10 +92,7 @@ static char *builtin_function_if(struct ast_channel *chan, char *cmd, char *data char *iftrue; char *iffalse; - if (!(data = ast_strdupa(data))) { - ast_log(LOG_WARNING, "Memory Error!\n"); - return NULL; - } + data = ast_strdupa(data); data = ast_strip_quoted(data, "\"", "\""); expr = strsep(&data, "?"); @@ -129,10 +123,7 @@ static char *builtin_function_set(struct ast_channel *chan, char *cmd, char *dat char *varname; char *val; - if (!(data = ast_strdupa(data))) { - ast_log(LOG_WARNING, "Memory Error!\n"); - return NULL; - } + data = ast_strdupa(data); varname = strsep(&data, "="); val = data; |