<p>pespin <strong>submitted</strong> this change.</p><p><a href="https://gerrit.osmocom.org/c/osmo-pcu/+/22420">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  laforge: Looks good to me, but someone else must approve
  osmith: Looks good to me, but someone else must approve
  pespin: Looks good to me, approved
  Jenkins Builder: Verified

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">tbf: Drop always-true condition checking for MS<br><br>The TBF can sometimes be detached from an MS, for eg. when switching<br>from one MS object to another due to them being merged after we found<br>duplicate objects upon receiving new information from it, but that<br>change is instantaneous so it shouldn't be a problem. The only other way<br>where an MS can be detached from an MS is during the end of its (or the<br>MS) life, where it is not sending data anymore.<br><br>Hence, it is safe to drop those checks for MS not being null. Those<br>being trigger, it should be considered a bug.<br><br>Change-Id: If292a53a09a64664031e756bff4735b9c6ee8651<br>---<br>M src/tbf.cpp<br>1 file changed, 3 insertions(+), 3 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/tbf.cpp b/src/tbf.cpp</span><br><span>index 37af21f..248e8ef 100644</span><br><span>--- a/src/tbf.cpp</span><br><span>+++ b/src/tbf.cpp</span><br><span>@@ -196,16 +196,16 @@</span><br><span>      enum CodingScheme cs;</span><br><span> </span><br><span>    if (direction == GPRS_RLCMAC_UL_TBF)</span><br><span style="color: hsl(0, 100%, 40%);">-            cs = m_ms ? ms_current_cs_ul(m_ms) : UNKNOWN;</span><br><span style="color: hsl(120, 100%, 40%);">+         cs = ms_current_cs_ul(m_ms);</span><br><span>         else</span><br><span style="color: hsl(0, 100%, 40%);">-            cs = m_ms ? ms_current_cs_dl(m_ms) : UNKNOWN;</span><br><span style="color: hsl(120, 100%, 40%);">+         cs = ms_current_cs_dl(m_ms);</span><br><span> </span><br><span>     return cs;</span><br><span> }</span><br><span> </span><br><span> gprs_llc_queue *gprs_rlcmac_tbf::llc_queue()</span><br><span> {</span><br><span style="color: hsl(0, 100%, 40%);">-        return m_ms ? ms_llc_queue(m_ms) : NULL;</span><br><span style="color: hsl(120, 100%, 40%);">+      return ms_llc_queue(m_ms);</span><br><span> }</span><br><span> </span><br><span> const gprs_llc_queue *gprs_rlcmac_tbf::llc_queue() const</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-pcu/+/22420">change 22420</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-pcu/+/22420"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-pcu </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: If292a53a09a64664031e756bff4735b9c6ee8651 </div>
<div style="display:none"> Gerrit-Change-Number: 22420 </div>
<div style="display:none"> Gerrit-PatchSet: 4 </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: osmith <osmith@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>