[Asterisk-code-review] app voicemail: Avoid always true when using pointer address. (asterisk[master])
Alexander Traud
asteriskteam at digium.com
Mon Jan 29 10:02:05 CST 2018
Alexander Traud has uploaded this change for review. ( https://gerrit.asterisk.org/8085
Change subject: app_voicemail: Avoid always true when using pointer address.
......................................................................
app_voicemail: Avoid always true when using pointer address.
clang 4.0 warned about this.
ASTERISK-27635
Change-Id: I213f230607d7fbe97c0f5f2d60da9cbf5a2d8231
---
M apps/app_voicemail.c
1 file changed, 2 insertions(+), 10 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/85/8085/1
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 4853a53..72e3e59 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -3499,7 +3499,7 @@
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;
}
}
@@ -3511,10 +3511,6 @@
continue;
}
if (vlist->vms->imapversion != imapversion) {
- continue;
- }
- if (!vlist->vms->imapuser) {
- ast_debug(3, "error: imapuser is NULL for %s\n", user);
continue;
}
@@ -3539,7 +3535,7 @@
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;
}
@@ -3552,10 +3548,6 @@
continue;
}
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;
}
--
To view, visit https://gerrit.asterisk.org/8085
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I213f230607d7fbe97c0f5f2d60da9cbf5a2d8231
Gerrit-Change-Number: 8085
Gerrit-PatchSet: 1
Gerrit-Owner: Alexander Traud <pabstraud at compuserve.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180129/37d9d840/attachment.html>
More information about the asterisk-code-review
mailing list