[Asterisk-code-review] app voicemail: Avoid always true when using pointer address. (asterisk[15])
Jenkins2
asteriskteam at digium.com
Wed Jan 31 15:45:41 CST 2018
Jenkins2 has submitted this change and it was merged. ( https://gerrit.asterisk.org/8087 )
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(-)
Approvals:
Joshua Colp: Looks good to me, but someone else must approve
Kevin Harwell: Looks good to me, approved
Jenkins2: Approved for Submit
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 35cfff9..d22a839 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -3480,7 +3480,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;
}
}
@@ -3492,10 +3492,6 @@
continue;
}
if (vlist->vms->imapversion != imapversion) {
- continue;
- }
- if (!vlist->vms->imapuser) {
- ast_debug(3, "error: imapuser is NULL for %s\n", user);
continue;
}
@@ -3520,7 +3516,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;
}
@@ -3533,10 +3529,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/8087
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 15
Gerrit-MessageType: merged
Gerrit-Change-Id: I213f230607d7fbe97c0f5f2d60da9cbf5a2d8231
Gerrit-Change-Number: 8087
Gerrit-PatchSet: 1
Gerrit-Owner: Alexander Traud <pabstraud at compuserve.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180131/5df6bd6a/attachment.html>
More information about the asterisk-code-review
mailing list