diff options
author | Matthew Jordan <mjordan@digium.com> | 2015-04-08 11:44:32 +0000 |
---|---|---|
committer | Matthew Jordan <mjordan@digium.com> | 2015-04-08 11:44:32 +0000 |
commit | f324870dab2f13a0314bd7203dad52392b6089bf (patch) | |
tree | 08f57eb77d40d53ba3804cd2940585a0e6875fef /apps/app_queue.c | |
parent | a6aed7f6f661a7d65601804dd4bbf89c11e968e1 (diff) |
clang compiler warnings: Fix pointer-bool-converesion warnings
This patch fixes several warnings pointed out by the clang compiler.
* chan_pjsip: Removed check for data->text, as it will always be non-NULL.
* app_minivm: Fixed evaluation of etemplate->locale, which will always
evaluate to 'true'. This patch changes the evaluation to use
ast_strlen_zero.
* app_queue:
- Fixed evaluation of qe->parent->monfmt, which always evaluates to
true. Instead, we just check to see if the dereferenced pointer
evaluates to true.
- Fixed evaluation of mem->state_interface, wrapping it with a call to
ast_strlen_zero.
* res_smdi: Wrapped search_msg->mesg_desk_term with calls to ast_strlen_zero.
Review: https://reviewboard.asterisk.org/r/4541
ASTERISK-24917
Reported by: dkdegroot
patches:
rb4541.patch submitted by dkdegroot (License 6600)
........
Merged revisions 434285 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@434286 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_queue.c')
-rw-r--r-- | apps/app_queue.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c index 9e5b8f519..2e6b10c4d 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -6684,7 +6684,7 @@ static int try_calling(struct queue_ent *qe, struct ast_flags opts, char **opt_a ast_channel_unlock(qe->chan); /* Begin Monitoring */ - if (qe->parent->monfmt && *qe->parent->monfmt) { + if (*qe->parent->monfmt) { if (!qe->parent->montype) { const char *monexec; ast_debug(1, "Starting Monitor as requested.\n"); @@ -9088,7 +9088,7 @@ static char *__queues_show(struct mansession *s, int fd, int argc, const char * ast_str_set(&out, 0, " %s", mem->membername); if (strcasecmp(mem->membername, mem->interface)) { ast_str_append(&out, 0, " (%s", mem->interface); - if (mem->state_interface) { + if (!ast_strlen_zero(mem->state_interface)) { ast_str_append(&out, 0, " from %s", mem->state_interface); } ast_str_append(&out, 0, ")"); |