<p>Patch set 7:<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/+/11337">View Change</a></p><p>9 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.asterisk.org/#/c/11337/7/res/res_prometheus.c">File res/res_prometheus.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/11337/7/res/res_prometheus.c@283">Patch Set #7, Line 283:</a> <code style="font-family:monospace,monospace"></code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Should have a check for NULL metric.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/11337/7/res/res_prometheus.c@295">Patch Set #7, Line 295:</a> <code style="font-family:monospace,monospace"> AST_LIST_TRAVERSE_SAFE_BEGIN(&existing->children, child, entry) {</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Not modifying the linked list so _SAFE_ isn't needed.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/11337/7/res/res_prometheus.c@314">Patch Set #7, Line 314:</a> <code style="font-family:monospace,monospace"> AST_VECTOR_APPEND(&metrics, metric);</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Can fail if vector needs to grow.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/11337/7/res/res_prometheus.c@333">Patch Set #7, Line 333:</a> <code style="font-family:monospace,monospace"> if (!existing) {</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">I don't think this can happen.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/11337/7/res/res_prometheus.c@350">Patch Set #7, Line 350:</a> <code style="font-family:monospace,monospace"> AST_LIST_INSERT_TAIL(&root->children, child, entry);</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">So the first child of the removed metric gets nominated to be the new parent of the rest of the list entries?</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/11337/7/res/res_prometheus.c@527">Patch Set #7, Line 527:</a> <code style="font-family:monospace,monospace"></code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Probably want to check that callback->name and callback->callback_fn aren't NULL;</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/11337/7/res/res_prometheus.c@541">Patch Set #7, Line 541:</a> <code style="font-family:monospace,monospace"> if (!entry) {</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Don't think this can happen.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/11337/7/res/res_prometheus.c@601">Patch Set #7, Line 601:</a> <code style="font-family:monospace,monospace"> if (!callback) {</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Don't think this can happen.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/11337/7/res/res_prometheus.c@611">Patch Set #7, Line 611:</a> <code style="font-family:monospace,monospace"> if (!metric) {</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Don't think this can happen.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/11337">change 11337</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/+/11337"/><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-Change-Id: I891433a272c92fd11c705a2c36d65479a415ec42 </div>
<div style="display:none"> Gerrit-Change-Number: 11337 </div>
<div style="display:none"> Gerrit-PatchSet: 7 </div>
<div style="display:none"> Gerrit-Owner: Matt Jordan <mjordan@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Matt Jordan <mjordan@digium.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Mon, 20 May 2019 16:03:11 +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>