<p><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/22085">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/+/22085/3/src/osmo-bsc/handover_decision_2.c">File src/osmo-bsc/handover_decision_2.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/+/22085/3/src/osmo-bsc/handover_decision_2.c@404">Patch Set #3, Line 404:</a> <code style="font-family:monospace,monospace">      /* There can be no negative amount of free TCH/x, clamp to a minimum of zero available slots. This could</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">I would rather make sure this doesn't happen in the caller and have the parameters be unsigned in th […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">I had unsigned values originally, but decided to change to signed purely for paranoia:<br>the problem with unsigned values is that when we hit a negative value for some buggy reason, the comparison would result in the negative number being > than the positive one.</p><p style="white-space: pre-wrap; word-wrap: break-word;">The caller in practice does not ever pass negative amounts.<br>Maybe OSMO_ASSERT() then?<br>Still I want to keep signed values in order to catch bugs like that...</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-bsc/+/22085">change 22085</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/+/22085"/><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: I55234c6c99eb02ceee52be0d7388bea14304930f </div>
<div style="display:none"> Gerrit-Change-Number: 22085 </div>
<div style="display:none"> Gerrit-PatchSet: 3 </div>
<div style="display:none"> Gerrit-Owner: neels <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-CC: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Mon, 11 Jan 2021 15:05:14 +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: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: comment </div>