<p><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/21084">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/osmo-bsc/+/21084/7/src/osmo-bsc/abis_rsl.c">File src/osmo-bsc/abis_rsl.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/+/21084/7/src/osmo-bsc/abis_rsl.c@494">Patch Set #7, Line 494:</a> <code style="font-family:monospace,monospace">       msgb_tlv_put(msg, RSL_IE_OSMO_REP_ACCH_CAP, sizeof(cap),</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">I think it should be possible to avoid allocating this structure on stack and then copying it over to the buffer on heap:</p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">  struct abis_rsl_osmo_rep_acch_cap *cap;</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">  cap = (struct abis_rsl_osmo_rep_acch_cap *) msgb->tail;<br>  msgb_tlv_put(msg, RSL_IE_OSMO_REP_ACCH_CAP, sizeof(*cap),<br>               (uint8_t *) bts->repeated_acch_capability_bts);</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">  cap->foo = bar; // ...</pre></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-bsc/+/21084">change 21084</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/+/21084"/><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: I39ae439d05562b35b2e47774dc92f8789fea1a57 </div>
<div style="display:none"> Gerrit-Change-Number: 21084 </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-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: neels <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-CC: fixeria <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Gerrit-CC: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-CC: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Wed, 18 Nov 2020 08:22:31 +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>