<p>Sean Bright <strong>posted comments</strong> on this change.</p><p><a href="https://gerrit.asterisk.org/9224">View Change</a></p><p>Patch set 1:</p><p>(9 comments)</p><ul style="list-style: none; padding-left: 20px;"><li><p><a href="https://gerrit.asterisk.org/#/c/9224/1/include/asterisk/data_buffer.h">File include/asterisk/data_buffer.h:</a></p><ul style="list-style: none; padding-left: 20px;"><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/9224/1/include/asterisk/data_buffer.h@114">Patch Set #1, Line 114:</a> <code style="font-family:monospace,monospace"> * \brief Retrieve a data payload from the data buffer</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Retrieve -> Remove?</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/9224/1/include/asterisk/data_buffer.h@129">Patch Set #1, Line 129:</a> <code style="font-family:monospace,monospace"> * \brief Retrieve the first payload from the data buffer</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Retrieve -> Remove?</p></li></ul></li><li><p><a href="https://gerrit.asterisk.org/#/c/9224/1/main/data_buffer.c">File main/data_buffer.c:</a></p><ul style="list-style: none; padding-left: 20px;"><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/9224/1/main/data_buffer.c@307">Patch Set #1, Line 307:</a> <code style="font-family:monospace,monospace">  struct data_buffer_payload_entry *buffer_payload;</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Minor: This can be local to the if block below.</p></li></ul></li><li><p><a href="https://gerrit.asterisk.org/#/c/9224/1/res/res_rtp_asterisk.c">File res/res_rtp_asterisk.c:</a></p><ul style="list-style: none; padding-left: 20px;"><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/9224/1/res/res_rtp_asterisk.c@2759">Patch Set #1, Line 2759:</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 (elem < value) {<br>                return -1;<br>    }<br><br>   if (value < elem) {<br>                return 1;<br>     }<br><br>   return 0;<br></pre></blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">How about:</p><pre style="font-family: monospace,monospace; white-space: pre-wrap;"> return elem - value;</pre></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/9224/1/res/res_rtp_asterisk.c@2773">Patch Set #1, Line 2773:</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 (elem == value) {<br>          return 1;<br>     }<br><br>   return 0;<br></pre></blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">How about:</p><pre style="font-family: monospace,monospace; white-space: pre-wrap;"> return elem == value;</pre></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/9224/1/res/res_rtp_asterisk.c@4122">Patch Set #1, Line 4122:</a> <code style="font-family:monospace,monospace">     rate = rtp_get_rate(rtp->f.subclass.format);</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">This is only used in the block at line 4138. You can probably just inline the function call.</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/9224/1/res/res_rtp_asterisk.c@4205">Patch Set #1, Line 4205:</a> <code style="font-family:monospace,monospace"> rate = rtp_get_rate(rtp->f.subclass.format);</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">This is only used in the block at 4227. You can probably just inline the function call.</p></li></ul></li><li><p><a href="https://gerrit.asterisk.org/#/c/9224/1/tests/test_data_buffer.c">File tests/test_data_buffer.c:</a></p><ul style="list-style: none; padding-left: 20px;"><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/9224/1/tests/test_data_buffer.c@251">Patch Set #1, Line 251:</a> <code style="font-family:monospace,monospace">               if (ret != 0) {</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">if (ret)</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/9224/1/tests/test_data_buffer.c@277">Patch Set #1, Line 277:</a> <code style="font-family:monospace,monospace">             if (ret != 0) {</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">if (ret)</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/9224">change 9224</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/9224"/><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: comment </div>
<div style="display:none"> Gerrit-Change-Id: Idab644b08a1593659c92cda64132ccc203fe991d </div>
<div style="display:none"> Gerrit-Change-Number: 9224 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Benjamin Keith Ford <bford@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Sean Bright <sean.bright@gmail.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Wed, 20 Jun 2018 13:33:53 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>