<p>Sean Bright has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/10793">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">utils: Don't set or clear flags that don't need setting or clearing<br><br>Change-Id: I0e7fb507ac09b15e45e1ff8501ecfca67afa5217<br>---<br>M main/utils.c<br>1 file changed, 8 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/93/10793/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/main/utils.c b/main/utils.c</span><br><span>index c82ecb9..3d3750b 100644</span><br><span>--- a/main/utils.c</span><br><span>+++ b/main/utils.c</span><br><span>@@ -2813,9 +2813,17 @@</span><br><span> </span><br><span>      switch (op) {</span><br><span>        case AST_FD_FLAG_SET:</span><br><span style="color: hsl(120, 100%, 40%);">+         if ((f & flags) == flags) {</span><br><span style="color: hsl(120, 100%, 40%);">+                       /* There is nothing to set */</span><br><span style="color: hsl(120, 100%, 40%);">+                 return 0;</span><br><span style="color: hsl(120, 100%, 40%);">+             }</span><br><span>            f |= flags;</span><br><span>          break;</span><br><span>       case AST_FD_FLAG_CLEAR:</span><br><span style="color: hsl(120, 100%, 40%);">+               if (!(f & flags)) {</span><br><span style="color: hsl(120, 100%, 40%);">+                       /* There is nothing to clear */</span><br><span style="color: hsl(120, 100%, 40%);">+                       return 0;</span><br><span style="color: hsl(120, 100%, 40%);">+             }</span><br><span>            f &= ~flags;</span><br><span>             break;</span><br><span>       default:</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/10793">change 10793</a>. To unsubscribe, or for help writing mail filters, 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/10793"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I0e7fb507ac09b15e45e1ff8501ecfca67afa5217 </div>
<div style="display:none"> Gerrit-Change-Number: 10793 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Sean Bright <sean.bright@gmail.com> </div>