diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-10-26 19:48:14 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-10-26 19:48:14 +0000 |
commit | 2a1fd152edcbcad451a31a94171be354f9cbc94d (patch) | |
tree | cc336d91bb85ce45338470c9de5c8fd8717c9c73 /apps/app_queue.c | |
parent | 1f35efeea36f2d234d0b20ff2c7017d350001ac6 (diff) |
remove unnecessary checks before calls to ast_strlen_zero
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6864 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_queue.c')
-rwxr-xr-x | apps/app_queue.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c index a98612cc4..daa543235 100755 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -2554,7 +2554,7 @@ static int pqm_exec(struct ast_channel *chan, void *data) struct localuser *u; char *queuename, *interface; - if (!data || ast_strlen_zero(data)) { + if (ast_strlen_zero(data)) { ast_log(LOG_WARNING, "PauseQueueMember requires an argument ([queuename]|interface])\n"); return -1; } @@ -2598,7 +2598,7 @@ static int upqm_exec(struct ast_channel *chan, void *data) struct localuser *u; char *queuename, *interface; - if (!data || ast_strlen_zero(data)) { + if (ast_strlen_zero(data)) { ast_log(LOG_WARNING, "UnpauseQueueMember requires an argument ([queuename]|interface])\n"); return -1; } @@ -2645,7 +2645,7 @@ static int rqm_exec(struct ast_channel *chan, void *data) char tmpchan[256]=""; char *interface = NULL; - if (!data || ast_strlen_zero(data)) { + if (ast_strlen_zero(data)) { ast_log(LOG_WARNING, "RemoveQueueMember requires an argument (queuename[|interface])\n"); return -1; } @@ -2709,7 +2709,7 @@ static int aqm_exec(struct ast_channel *chan, void *data) char *penaltys=NULL; int penalty = 0; - if (!data || ast_strlen_zero(data)) { + if (ast_strlen_zero(data)) { ast_log(LOG_WARNING, "AddQueueMember requires an argument (queuename[|[interface][|penalty]])\n"); return -1; } @@ -2737,14 +2737,14 @@ static int aqm_exec(struct ast_channel *chan, void *data) penaltys++; } } - if (!interface || ast_strlen_zero(interface)) { + if (ast_strlen_zero(interface)) { ast_copy_string(tmpchan, chan->name, sizeof(tmpchan)); interface = strrchr(tmpchan, '-'); if (interface) *interface = '\0'; interface = tmpchan; } - if (penaltys && !ast_strlen_zero(penaltys)) { + if (!ast_strlen_zero(penaltys)) { if ((sscanf(penaltys, "%d", &penalty) != 1) || penalty < 0) { ast_log(LOG_WARNING, "Penalty '%s' is invalid, must be an integer >= 0\n", penaltys); penalty = 0; @@ -2797,7 +2797,7 @@ static int queue_exec(struct ast_channel *chan, void *data) /* Our queue entry */ struct queue_ent qe; - if (!data || ast_strlen_zero(data)) { + if (ast_strlen_zero(data)) { ast_log(LOG_WARNING, "Queue requires an argument: queuename[|options[|URL][|announceoverride][|timeout]]\n"); return -1; } @@ -3035,7 +3035,7 @@ static char *queue_function_qac(struct ast_channel *chan, char *cmd, char *data, ast_copy_string(buf, "0", len); - if (!data || ast_strlen_zero(data)) { + if (ast_strlen_zero(data)) { ast_log(LOG_ERROR, "QUEUEAGENTCOUNT requires an argument: queuename\n"); LOCAL_USER_REMOVE(u); return buf; |