<p><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/21463">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/+/21463/2/src/osmo-bsc/nm_gprs_cell_fsm.c">File src/osmo-bsc/nm_gprs_cell_fsm.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/+/21463/2/src/osmo-bsc/nm_gprs_cell_fsm.c@99">Patch Set #2, Line 99:</a> <code style="font-family:monospace,monospace">         OSMO_ASSERT(msgb); /* if (!msgb); break; */</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">why not if(!msgb)? Should we really segfault on low memory?</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">That comment should go away, it's a leftover I left now I'm doing tests if I find something failing.</p><p style="white-space: pre-wrap; word-wrap: break-word;">TBH, it's not important, that's not going to happen theoretically, in linux malloc won't ever fail and return NULL, rather the process will be stalled until the kernel allocates memory for it or it is killed by OOM killer, so it really doesn't matter. ASSERT has less lines than if + break, that's the only reason. Adding the assert there rpovides a quick security + easy way to see where the issue was, in the really improbable scenario where NULL is returned, which is really not expected.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-bsc/+/21463">change 21463</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/+/21463"/><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: I074f4496aa153b5f84e6ce85f413754efe64d831 </div>
<div style="display:none"> Gerrit-Change-Number: 21463 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Reviewer: lynxis lazus <lynxis@fe80.eu> </div>
<div style="display:none"> Gerrit-Comment-Date: Thu, 03 Dec 2020 15:37:32 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Comment-In-Reply-To: lynxis lazus <lynxis@fe80.eu> </div>
<div style="display:none"> Gerrit-MessageType: comment </div>