summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorAlexander Traud <pabstraud@compuserve.com>2018-01-29 17:00:52 +0100
committerAlexander Traud <pabstraud@compuserve.com>2018-01-29 17:00:52 +0100
commit156b12340e00d4197e37eb1b0e364e44a4e629cf (patch)
treedb62e83ef75d6cf38a4123777cec5573fc871efa /apps
parentda5859246db94d9852323b1357401559f162d7ba (diff)
app_voicemail: Avoid always true when using pointer address.
clang 4.0 warned about this. ASTERISK-27635 Change-Id: I213f230607d7fbe97c0f5f2d60da9cbf5a2d8231
Diffstat (limited to 'apps')
-rw-r--r--apps/app_voicemail.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 4853a53f9..72e3e59c1 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -3499,7 +3499,7 @@ static struct vm_state *get_vm_state_by_imapuser(const char *user, int interacti
if (interactive) {
struct vm_state *vms;
pthread_once(&ts_vmstate.once, ts_vmstate.key_init);
- if ((vms = pthread_getspecific(ts_vmstate.key)) && vms->imapuser && !strcmp(vms->imapuser, user)) {
+ if ((vms = pthread_getspecific(ts_vmstate.key)) && !strcmp(vms->imapuser, user)) {
return vms;
}
}
@@ -3513,10 +3513,6 @@ static struct vm_state *get_vm_state_by_imapuser(const char *user, int interacti
if (vlist->vms->imapversion != imapversion) {
continue;
}
- if (!vlist->vms->imapuser) {
- ast_debug(3, "error: imapuser is NULL for %s\n", user);
- continue;
- }
if (!strcmp(vlist->vms->imapuser, user) && (interactive == 2 || vlist->vms->interactive == interactive)) {
AST_LIST_UNLOCK(&vmstates);
@@ -3539,7 +3535,7 @@ static struct vm_state *get_vm_state_by_mailbox(const char *mailbox, const char
if (interactive) {
struct vm_state *vms;
pthread_once(&ts_vmstate.once, ts_vmstate.key_init);
- if ((vms = pthread_getspecific(ts_vmstate.key)) && vms->username && vms->context &&
+ if ((vms = pthread_getspecific(ts_vmstate.key)) &&
!strcmp(vms->username,mailbox) && !strcmp(vms->context, local_context)) {
return vms;
}
@@ -3554,10 +3550,6 @@ static struct vm_state *get_vm_state_by_mailbox(const char *mailbox, const char
if (vlist->vms->imapversion != imapversion) {
continue;
}
- if (!vlist->vms->username || !vlist->vms->context) {
- ast_debug(3, "error: username is NULL for %s\n", mailbox);
- continue;
- }
ast_debug(3, "comparing mailbox %s@%s (i=%d) to vmstate mailbox %s@%s (i=%d)\n", mailbox, local_context, interactive, vlist->vms->username, vlist->vms->context, vlist->vms->interactive);