<p><a href="https://gerrit.asterisk.org/c/asterisk/+/15331">View Change</a></p><p>3 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.asterisk.org/c/asterisk/+/15331/3/main/utils.c">File main/utils.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/+/15331/3/main/utils.c@2379">Patch Set #3, Line 2379:</a> <code style="font-family:monospace,monospace">int ast_parse_name_value(const char *input, char **name, char **value)</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Unless there are additional consumers of this function I don't see a compelling reason to make it part of the public API. A couple suggestions:</p><ul><li>Move it back into pbx_variables.c</li><li>Make the signature and behavior identical to strsep() except that it finds the "correct" equals sign instead of just the first one</li></ul></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/15331/3/main/utils.c@2388">Patch Set #3, Line 2388:</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(input)) {<br> ast_log(LOG_ERROR, "Input must be not NULL");<br> ret = -1;<br> }<br></pre></blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">This error message appears to me to be directed at a programmer and not a user. If this function should not accept NULLs, make this an ast_assert(). If passing NULL is OK, then remove the error message.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/15331/3/main/utils.c@2411">Patch Set #3, Line 2411:</a> <code style="font-family:monospace,monospace"> quote = quote ? 0 : 1;</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">quote = !quote;</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/15331">change 15331</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/+/15331"/><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: I7cd3bc6118033530ad00ae4b6bdad97b6b349b6f </div>
<div style="display:none"> Gerrit-Change-Number: 15331 </div>
<div style="display:none"> Gerrit-PatchSet: 3 </div>
<div style="display:none"> Gerrit-Owner: Leandro Dardini <ldardini@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: Sean Bright <sean.bright@gmail.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Mon, 25 Jan 2021 17:12:08 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Gerrit-MessageType: comment </div>