Explicitly initialize m_v_n and m_v_b
diff mbox

Message ID 1456332018-30709-1-git-send-email-msuraev@sysmocom.de
State New
Headers show

Commit Message

Max Feb. 24, 2016, 4:40 p.m. UTC
From: Max <msuraev@sysmocom.de>

Call reset() to initialize m_v_b in gprs_rlc_dl_window() and
m_v_n in gprs_rlc_ul_window() constructors.

Fixes: Coverity: CID 1351738, 1351737
---
 src/rlc.h | 2 ++
 1 file changed, 2 insertions(+)

Patch
diff mbox

diff --git a/src/rlc.h b/src/rlc.h
index 54f28df..c3c03e0 100644
--- a/src/rlc.h
+++ b/src/rlc.h
@@ -448,6 +448,7 @@  inline gprs_rlc_dl_window::gprs_rlc_dl_window()
 	: m_v_s(0)
 	, m_v_a(0)
 {
+	m_v_b.reset();
 }
 
 inline const uint16_t gprs_rlc_dl_window::v_s() const
@@ -494,6 +495,7 @@  inline gprs_rlc_ul_window::gprs_rlc_ul_window()
 	: m_v_r(0)
 	, m_v_q(0)
 {
+	m_v_n.reset();
 }
 
 inline bool gprs_rlc_ul_window::is_in_window(uint16_t bsn) const