This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
lynxis lazus gerrit-no-reply at lists.osmocom.orglynxis lazus has submitted this change and it was merged.
Change subject: llc: remove NULL-pointer check of gprs_llc_queue::size()/octets()
......................................................................
llc: remove NULL-pointer check of gprs_llc_queue::size()/octets()
All callers now check the pointer before calling it.
gcc6 is optimizing `if (!this) {CODE}` as this is assumed to never be a
std::nullptr here.
Change-Id: I918a094e0dc59098a9eb00d152c9ae42d36b3a99
---
M src/llc.h
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
Harald Welte: Looks good to me, approved
Jenkins Builder: Verified
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;
}
--
To view, visit https://gerrit.osmocom.org/213
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I918a094e0dc59098a9eb00d152c9ae42d36b3a99
Gerrit-PatchSet: 7
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus <lynxis at fe80.eu>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Holger Freyther <holger at freyther.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: lynxis lazus <lynxis at fe80.eu>