diff options
author | Russell Bryant <russell@russellbryant.com> | 2005-10-26 19:48:14 +0000 |
---|---|---|
committer | Russell Bryant <russell@russellbryant.com> | 2005-10-26 19:48:14 +0000 |
commit | 5187de9ab6e5abc33ee6de4c4b16dbd3e3a5a7a7 (patch) | |
tree | cc336d91bb85ce45338470c9de5c8fd8717c9c73 /apps/app_read.c | |
parent | dbc5c06c94d4472730e25c77f9b4e3d59db6b6ee (diff) |
remove unnecessary checks before calls to ast_strlen_zero
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6864 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_read.c')
-rwxr-xr-x | apps/app_read.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/app_read.c b/apps/app_read.c index ecf472e59..0c4e2872b 100755 --- a/apps/app_read.c +++ b/apps/app_read.c @@ -89,7 +89,7 @@ static int read_exec(struct ast_channel *chan, void *data) char *argcopy = NULL; char *args[8]; - if (!data || ast_strlen_zero(data)) { + if (ast_strlen_zero(data)) { ast_log(LOG_WARNING, "Read requires an argument (variable)\n"); return -1; } @@ -143,7 +143,7 @@ static int read_exec(struct ast_channel *chan, void *data) to *= 1000; } - if (!(filename) || ast_strlen_zero(filename)) + if (ast_strlen_zero(filename)) filename = NULL; if (maxdigitstr) { maxdigits = atoi(maxdigitstr); @@ -152,7 +152,7 @@ static int read_exec(struct ast_channel *chan, void *data) } else if (option_verbose > 2) ast_verbose(VERBOSE_PREFIX_3 "Accepting a maximum of %d digits.\n", maxdigits); } - if (!(varname) || ast_strlen_zero(varname)) { + if (ast_strlen_zero(varname)) { ast_log(LOG_WARNING, "Invalid! Usage: Read(variable[|filename][|maxdigits][|option][|attempts][|timeout])\n\n"); LOCAL_USER_REMOVE(u); return -1; |