diff options
author | Matthew Jordan <mjordan@digium.com> | 2015-04-08 11:45:05 +0000 |
---|---|---|
committer | Matthew Jordan <mjordan@digium.com> | 2015-04-08 11:45:05 +0000 |
commit | b8fa8aa77534fae8cea46d67c15b49f9677879bb (patch) | |
tree | 1d4088d8f73386445f3508cd53266a967271289b /apps/app_minivm.c | |
parent | 016fba12e2d1e4ca8a48af0a2090cb8a6b5a2272 (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
........
Merged revisions 434286 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@434287 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_minivm.c')
-rw-r--r-- | apps/app_minivm.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/app_minivm.c b/apps/app_minivm.c index fc4f9a274..45d04d8ba 100644 --- a/apps/app_minivm.c +++ b/apps/app_minivm.c @@ -1838,7 +1838,8 @@ static int notify_new_message(struct ast_channel *chan, const char *templatename etemplate = message_template_find(vmu->ptemplate); if (!etemplate) etemplate = message_template_find("pager-default"); - if (etemplate->locale) { + + if (!ast_strlen_zero(etemplate->locale)) { ast_copy_string(oldlocale, setlocale(LC_TIME, ""), sizeof(oldlocale)); setlocale(LC_TIME, etemplate->locale); } @@ -1867,9 +1868,8 @@ static int notify_new_message(struct ast_channel *chan, const char *templatename notify_cleanup: run_externnotify(chan, vmu); /* Run external notification */ - - if (etemplate->locale) { - setlocale(LC_TIME, oldlocale); /* Rest to old locale */ + if (!ast_strlen_zero(etemplate->locale)) { + setlocale(LC_TIME, oldlocale); /* Reset to old locale */ } return res; } |