<p>Alexander Traud has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/8087">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">app_voicemail: Avoid always true when using pointer address.<br><br>clang 4.0 warned about this.<br><br>ASTERISK-27635<br><br>Change-Id: I213f230607d7fbe97c0f5f2d60da9cbf5a2d8231<br>---<br>M apps/app_voicemail.c<br>1 file changed, 2 insertions(+), 10 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/87/8087/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c<br>index 35cfff9..d22a839 100644<br>--- a/apps/app_voicemail.c<br>+++ b/apps/app_voicemail.c<br>@@ -3480,7 +3480,7 @@<br> if (interactive) {<br> struct vm_state *vms;<br> pthread_once(&ts_vmstate.once, ts_vmstate.key_init);<br>- if ((vms = pthread_getspecific(ts_vmstate.key)) && vms->imapuser && !strcmp(vms->imapuser, user)) {<br>+ if ((vms = pthread_getspecific(ts_vmstate.key)) && !strcmp(vms->imapuser, user)) {<br> return vms;<br> }<br> }<br>@@ -3492,10 +3492,6 @@<br> continue;<br> }<br> if (vlist->vms->imapversion != imapversion) {<br>- continue;<br>- }<br>- if (!vlist->vms->imapuser) {<br>- ast_debug(3, "error: imapuser is NULL for %s\n", user);<br> continue;<br> }<br> <br>@@ -3520,7 +3516,7 @@<br> if (interactive) {<br> struct vm_state *vms;<br> pthread_once(&ts_vmstate.once, ts_vmstate.key_init);<br>- if ((vms = pthread_getspecific(ts_vmstate.key)) && vms->username && vms->context &&<br>+ if ((vms = pthread_getspecific(ts_vmstate.key)) &&<br> !strcmp(vms->username,mailbox) && !strcmp(vms->context, local_context)) {<br> return vms;<br> }<br>@@ -3533,10 +3529,6 @@<br> continue;<br> }<br> if (vlist->vms->imapversion != imapversion) {<br>- continue;<br>- }<br>- if (!vlist->vms->username || !vlist->vms->context) {<br>- ast_debug(3, "error: username is NULL for %s\n", mailbox);<br> continue;<br> }<br> <br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/8087">change 8087</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/8087"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 15 </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I213f230607d7fbe97c0f5f2d60da9cbf5a2d8231 </div>
<div style="display:none"> Gerrit-Change-Number: 8087 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Alexander Traud <pabstraud@compuserve.com> </div>