<p><a href="https://gerrit.osmocom.org/14131">View Change</a></p><p>1 comment:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/#/c/14131/4/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c">File openbsc/src/osmo-bsc_nat/bsc_mgcp_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.osmocom.org/#/c/14131/4/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c@695">Patch Set #4, Line 695:</a> <code style="font-family:monospace,monospace">        if (sscanf(str + 9, "%u", &osmux_cid) != 1) {</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">I would suggest to use a variable, i.e. "x_osmux_len = strlen("X-Osmux: "); and then use it both in the strncasecmp avbove and here.  This should be optimized away by a good compiler, and it avoids either repeating oneself or magic numbers.  Or if you want to use "9", then at least have a #define somewhere</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/14131">change 14131</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/14131"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: openbsc </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: comment </div>
<div style="display:none"> Gerrit-Change-Id: Iadc004064a5a237c93009f242cb943ebc4d2d7e6 </div>
<div style="display:none"> Gerrit-Change-Number: 14131 </div>
<div style="display:none"> Gerrit-PatchSet: 4 </div>
<div style="display:none"> Gerrit-Owner: Pau Espin Pedrol <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder (1000002) </div>
<div style="display:none"> Gerrit-Reviewer: Pau Espin Pedrol <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-CC: Harald Welte <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-Comment-Date: Thu, 23 May 2019 13:15:55 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-HasLabels: No </div>