Review at
https://gerrit.osmocom.org/136
RFC: remove this == NULL checks
The compile should ensure that this == NULL should never happen
Change-Id: Ifddaef70bb0a4402050c817b1000d515c3a7118b
---
M src/llc.h
M src/tbf.cpp
2 files changed, 2 insertions(+), 5 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/36/136/1
diff --git a/src/llc.h b/src/llc.h
index 94de16e..4883624 100644
--- a/src/llc.h
+++ b/src/llc.h
@@ -127,10 +127,10 @@
inline size_t gprs_llc_queue::size() const
{
- return this ? m_queue_size : 0;
+ return m_queue_size;
}
inline size_t gprs_llc_queue::octets() const
{
- return this ? m_queue_octets : 0;
+ return m_queue_octets;
}
diff --git a/src/tbf.cpp b/src/tbf.cpp
index 69b9e3a..51705e2 100644
--- a/src/tbf.cpp
+++ b/src/tbf.cpp
@@ -1181,9 +1181,6 @@
const char *gprs_rlcmac_tbf::name() const
{
- if (this == NULL)
- return "(no TBF)";
-
snprintf(m_name_buf, sizeof(m_name_buf) - 1,
"TBF(TFI=%d TLLI=0x%08x DIR=%s STATE=%s%s)",
m_tfi, tlli(),
--
To view, visit
https://gerrit.osmocom.org/136
To unsubscribe, visit
https://gerrit.osmocom.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifddaef70bb0a4402050c817b1000d515c3a7118b
Gerrit-PatchSet: 1
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu>