diff options
author | Alexander Couzens <lynxis@fe80.eu> | 2016-05-31 13:18:01 +0200 |
---|---|---|
committer | Holger Freyther <holger@freyther.de> | 2016-06-10 11:14:10 +0000 |
commit | e04fd0cf0f33ea26ebe5bfe6eef3494de2bc70f0 (patch) | |
tree | 772098d81bb3209c882e147413b6673f3837497d /src | |
parent | 6922bcd929d584bbb04b0f0fb190698c6e99f6de (diff) |
tbf: replace this == NULL check in tbf->name
All checks of (this == null) will be eliminated by GCC >= 6.1
(https://gcc.gnu.org/gcc-6/changes.html, Value range propagation now
assumes that the this pointer of C++ member functions is non-null.
Change-Id: Ifddaef70bb0a4402050c817b1000d515c3a7118b
Reviewed-on: https://gerrit.osmocom.org/136
Tested-by: Jenkins Builder
Reviewed-by: Harald Welte <laforge@gnumonks.org>
Reviewed-by: Holger Freyther <holger@freyther.de>
Diffstat (limited to 'src')
-rw-r--r-- | src/tbf.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/tbf.cpp b/src/tbf.cpp index 69b9e3a0..1fc1aefe 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -1176,14 +1176,11 @@ int gprs_rlcmac_tbf::set_tlli_from_ul(uint32_t new_tlli) const char *tbf_name(gprs_rlcmac_tbf *tbf) { - return tbf->name(); + return tbf ? tbf->name() : "(no TBF)"; } 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(), |