From 9434e52af988cf724b1974a3911f46d14e6f4846 Mon Sep 17 00:00:00 2001 From: aravind sirsikar Date: Wed, 2 Nov 2016 15:41:48 +0530 Subject: [PATCH] Modify return type of gprs_rlc_dl_window::distance to uint16_t Since there is a "&mod_sns()" present in this function, the outcome is always unsigned. Change-Id: I66f3db4dc27a6cbef146c832bf8b43f1492358a4 --- src/rlc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rlc.h b/src/rlc.h index b6934183..b2fcd958 100644 --- a/src/rlc.h +++ b/src/rlc.h @@ -300,7 +300,7 @@ struct gprs_rlc_dl_window: public gprs_rlc_window { const uint16_t v_s() const; const uint16_t v_s_mod(int offset) const; const uint16_t v_a() const; - const int16_t distance() const; + const uint16_t distance() const; /* Methods to manage reception */ int resend_needed(); @@ -539,7 +539,7 @@ inline void gprs_rlc_dl_window::raise(int moves) m_v_a = (m_v_a + moves) & mod_sns(); } -inline const int16_t gprs_rlc_dl_window::distance() const +inline const uint16_t gprs_rlc_dl_window::distance() const { return (m_v_s - m_v_a) & mod_sns(); }