<p>Patch set 1:<span style="border-radius: 3px; display: inline-block; margin: 0 2px; padding: 4px;background-color: #ffd4d4; color: #000000;">Code-Review -1</span></p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/13163">View Change</a></p><p>1 comment:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.asterisk.org/c/asterisk/+/13163/1/apps/app_senddtmf.c">File apps/app_senddtmf.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/13163/1/apps/app_senddtmf.c@175">Patch Set #1, Line 175:</a> </p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><pre style="font-family: monospace,monospace; white-space: pre-wrap;"> if (ast_strlen_zero(receive_s)) {<br>             receive = 0;<br>  } else {<br>              receive = abs(ast_true(receive_s));<br>   }<br><br>   if (receive) {<br></pre></blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">This can be simplified down to one if statement, like so:</p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">if (ast_true(receive_s)) {<br>    struct ast_frame f = { AST_FRAME_DTMF, };<br>    ...</pre><p style="white-space: pre-wrap; word-wrap: break-word;">The reason this is possible is because ast_true will return 0 if receive_s is NULL or does not contain a value that evaluates to true. Similarly, you won't need abs because as long as the return value from ast_true is not zero, it will evaluate to true. You won't need the receive variable anymore, either.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/13163">change 13163</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/c/asterisk/+/13163"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 16 </div>
<div style="display:none"> Gerrit-Change-Id: I183501297ae1dc294ae56b34acac9b0343eb2664 </div>
<div style="display:none"> Gerrit-Change-Number: 13163 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: lvl <digium@lvlconsultancy.nl> </div>
<div style="display:none"> Gerrit-Reviewer: Benjamin Keith Ford <bford@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Comment-Date: Wed, 13 Nov 2019 18:49:36 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: Yes </div>
<div style="display:none"> Gerrit-MessageType: comment </div>