aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2016-06-07 14:31:29 +0200
committerAlexander Couzens <lynxis@fe80.eu>2016-10-18 11:51:02 +0200
commite4727a3591c4c4d769d890806b159ade9af3f6aa (patch)
tree362b71fba8e527ff46365693ec19deab770a0ced
parentd38b92e972be130df3e6c908fb7e7bf1729ab7fb (diff)
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
-rw-r--r--src/llc.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/llc.h b/src/llc.h
index 94de16ed..48836240 100644
--- a/src/llc.h
+++ b/src/llc.h
@@ -127,10 +127,10 @@ inline bool gprs_llc::fits_in_current_frame(uint8_t chunk_size) const
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;
}