<p>Joshua C. Colp <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/10795">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Benjamin Keith Ford: Looks good to me, but someone else must approve
Joshua C. Colp: Looks good to me, but someone else must approve; Approved for Submit
George Joseph: Looks good to me, approved
</div><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;"><span>diff --git a/main/utils.c b/main/utils.c</span><br><span>index e0b8a6e..b45e7b5 100644</span><br><span>--- a/main/utils.c</span><br><span>+++ b/main/utils.c</span><br><span>@@ -2730,9 +2730,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/10795">change 10795</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/10795"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: I0e7fb507ac09b15e45e1ff8501ecfca67afa5217 </div>
<div style="display:none"> Gerrit-Change-Number: 10795 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Sean Bright <sean.bright@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: Benjamin Keith Ford <bford@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation (1000185) </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Joshua C. Colp <jcolp@digium.com> </div>