summaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
authorMatthew Jordan <mjordan@digium.com>2015-04-08 11:44:32 +0000
committerMatthew Jordan <mjordan@digium.com>2015-04-08 11:44:32 +0000
commitf324870dab2f13a0314bd7203dad52392b6089bf (patch)
tree08f57eb77d40d53ba3804cd2940585a0e6875fef /res
parenta6aed7f6f661a7d65601804dd4bbf89c11e968e1 (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 'res')
-rw-r--r--res/res_smdi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/res/res_smdi.c b/res/res_smdi.c
index c7e0ab29a..7a63fe46a 100644
--- a/res/res_smdi.c
+++ b/res/res_smdi.c
@@ -873,10 +873,10 @@ static int smdi_md_q_cmp_fn(void *obj, void *arg, int flags)
switch (flags & OBJ_SEARCH_MASK) {
case OBJ_SEARCH_OBJECT:
- if (search_msg->mesg_desk_num) {
+ if (!ast_strlen_zero(search_msg->mesg_desk_num)) {
cmp = strcmp(msg->mesg_desk_num, search_msg->mesg_desk_num);
}
- if (search_msg->mesg_desk_term) {
+ if (!ast_strlen_zero(search_msg->mesg_desk_term)) {
cmp |= strcmp(msg->mesg_desk_term, search_msg->mesg_desk_term);
}
break;