<p style="white-space: pre-wrap; word-wrap: break-word;">nice one, patch became much smaller!</p><p>Patch set 7:<span style="border-radius: 3px; display: inline-block; margin: 0 2px; padding: 4px;background-color: #d4ffd4;">Code-Review +1</span></p><p><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/24600">View Change</a></p><p>2 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/24600/6/src/osmo-bsc/handover_ctrl.c">File src/osmo-bsc/handover_ctrl.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.osmocom.org/c/osmo-bsc/+/24600/6/src/osmo-bsc/handover_ctrl.c@73">Patch Set #6, Line 73:</a> <code style="font-family:monospace,monospace">CTRL_CMD_DEFINE(NAME, CTRL_CMD VTY_CMD_PREFIX VTY_CMD); \</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">When CTRL_CMD it is used the constant will be defined like "handover2 min-free-slots tch-h\0", VTY_C […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">I figured out your nifty trick there later on : )<br>interesting solution, even though it had most of us confused at first.<br>with a comment explaining in detail that could have passed CR too : )</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/24600/7/src/osmo-bsc/handover_ctrl.c">File src/osmo-bsc/handover_ctrl.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.osmocom.org/c/osmo-bsc/+/24600/7/src/osmo-bsc/handover_ctrl.c@185">Patch Set #7, Line 185:</a> <code style="font-family:monospace,monospace">{</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">0) I don't understand yet where the spaces-to-dots conversion happens.<br>Is it possible that that step also sanitizes the '/' characters already,<br>and we could get away without needing a filter function?? (I guess not)</p><p style="white-space: pre-wrap; word-wrap: break-word;">1) Let's avoid allocating most strings with this step:</p><pre style="font-family: monospace,monospace; white-space: pre-wrap;"> if (osmo_separated_identifiers_valid(cmd->name, " -"))<br> return cmd;</pre><p style="white-space: pre-wrap; word-wrap: break-word;">2) I thought we could also try to use the existing osmo_identifier_sanitize_buf() API, something like</p><pre style="font-family: monospace,monospace; white-space: pre-wrap;"> cmd->name = talloc_strdup(cmd->name);<br> osmo_identifier_sanitize_buf(cmd->name, NULL, "-");</pre><p style="white-space: pre-wrap; word-wrap: break-word;">But AFAICT there are a number of problems with that, because unfortunately sep_chars has opposite meaning in osmo_separated_identifiers_valid() and osmo_identifier_sanitize_buf().<br>This loop here is also fine I guess, because there is only fixed hardcoded input data anyway. But if you like maybe give it a try...</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-bsc/+/24600">change 24600</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.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.osmocom.org/c/osmo-bsc/+/24600"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: osmo-bsc </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I12f143906818fd6b16e8783157cbb1eb51e49ffc </div>
<div style="display:none"> Gerrit-Change-Number: 24600 </div>
<div style="display:none"> Gerrit-PatchSet: 7 </div>
<div style="display:none"> Gerrit-Owner: dexter <pmaier@sysmocom.de> </div>
<div style="display:none"> Gerrit-Assignee: neels <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: daniel <dwillmann@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Reviewer: neels <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Wed, 07 Jul 2021 21:31:35 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: Yes </div>
<div style="display:none"> Comment-In-Reply-To: neels <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Comment-In-Reply-To: dexter <pmaier@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: comment </div>