mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
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
This commit is contained in:
@@ -1892,12 +1892,6 @@ static int sendtext(void *obj)
|
||||
.body_text = data->text
|
||||
};
|
||||
|
||||
/* NOT ast_strlen_zero, because a zero-length message is specifically
|
||||
* allowed by RFC 3428 (See section 10, Examples) */
|
||||
if (!data->text) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
ast_debug(3, "Sending in dialog SIP message\n");
|
||||
|
||||
ast_sip_create_request("MESSAGE", data->session->inv_session->dlg, data->session->endpoint, NULL, NULL, &tdata);
|
||||
|
Reference in New Issue
Block a user