<p>Matthew Fredrickson <strong>posted comments</strong> on this change.</p><p><a href="https://gerrit.asterisk.org/8604">View Change</a></p><p>Patch set 4:<span style="border-radius: 3px; display: inline-block; margin: 0 2px; padding: 4px;background-color: #ffd4d4;">Code-Review -1</span></p><p style="white-space: pre-wrap; word-wrap: break-word;">A couple of findings and questions.  Still looking through it, hopefully will have time to finish after lunch.</p><p>(5 comments)</p><ul style="list-style: none; padding-left: 20px;"><li><p><a href="https://gerrit.asterisk.org/#/c/8604/4/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/8604/4/main/data_buffer.c@138">Patch Set #4, Line 138:</a> <code style="font-family:monospace,monospace">                                ast_free(existing_payload);</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Whenever the data buffer entry is freed, it's contained payload may need re</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">+1</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/8604/4/main/data_buffer.c@141">Patch Set #4, Line 141:</a> <code style="font-family:monospace,monospace">                      node++;</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">No reason to continue incrementing node if node > size. Can wrap in an "els</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Seems like this is no *super* important though, no?</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/8604/4/main/data_buffer.c@150">Patch Set #4, Line 150:</a> <code style="font-family:monospace,monospace">void ast_data_buffer_cache_adjust(struct ast_data_buffer *buffer)</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Does this function need to be publicly exposed (shouldn't it be ok if it's static)?</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/8604/4/main/data_buffer.c@208">Patch Set #4, Line 208:</a> <code style="font-family:monospace,monospace">   if (buffer->count == buffer->max) {</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Do we really want to silently discard data on cases where we overflow the data_buffer?  Maybe we should be letting the caller deal with this situation (by doing buffer dropping, etc, itself) - or at the very least maybe we should be emitting some kind of conditional log message.</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/8604/4/main/data_buffer.c@260">Patch Set #4, Line 260:</a> <code style="font-family:monospace,monospace">  if (pos == -1) {</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">size_t should be unsigned, and should never be allowed to be -1.  I'm surprised that the compiler let this pass through.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/8604">change 8604</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/8604"/><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: Iff13c5d4795d52356959fe2a57360cd57dfade07 </div>
<div style="display:none"> Gerrit-Change-Number: 8604 </div>
<div style="display:none"> Gerrit-PatchSet: 4 </div>
<div style="display:none"> Gerrit-Owner: Benjamin Keith Ford <bford@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Benjamin Keith Ford <bford@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Matthew Fredrickson <creslin@digium.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Wed, 21 Mar 2018 16:19:44 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>