From d60950d0f31efcfbea5f0e6c0a551d6b2571b50b Mon Sep 17 00:00:00 2001 From: Francisco Date: Wed, 20 Oct 2021 14:46:46 +0100 Subject: [PATCH] lte,enb,rlc: change new_tx and prio_tx variable names to snake_case and ensure they are zero initialized --- lib/src/rlc/rlc.cc | 2 +- lib/src/rlc/rlc_am_lte.cc | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/src/rlc/rlc.cc b/lib/src/rlc/rlc.cc index fc541be60..987a19c0a 100644 --- a/lib/src/rlc/rlc.cc +++ b/lib/src/rlc/rlc.cc @@ -254,7 +254,7 @@ void rlc::get_buffer_state(uint32_t lcid, uint32_t& tx_queue, uint32_t& prio_tx_ uint32_t rlc::get_buffer_state(uint32_t lcid) { - uint32_t tx_queue, prio_tx_queue; + uint32_t tx_queue = 0, prio_tx_queue = 0; get_buffer_state(lcid, tx_queue, prio_tx_queue); return tx_queue + prio_tx_queue; } diff --git a/lib/src/rlc/rlc_am_lte.cc b/lib/src/rlc/rlc_am_lte.cc index d12850a23..b32f910c6 100644 --- a/lib/src/rlc/rlc_am_lte.cc +++ b/lib/src/rlc/rlc_am_lte.cc @@ -441,9 +441,9 @@ void rlc_am_lte::rlc_am_lte_tx::check_sn_reached_max_retx(uint32_t sn) uint32_t rlc_am_lte::rlc_am_lte_tx::get_buffer_state() { - uint32_t newtx = 0, priotx = 0; - get_buffer_state(newtx, priotx); - return newtx + priotx; + uint32_t new_tx_queue = 0, prio_tx_queue = 0; + get_buffer_state(new_tx_queue, prio_tx_queue); + return new_tx_queue + prio_tx_queue; } void rlc_am_lte::rlc_am_lte_tx::get_buffer_state(uint32_t& n_bytes_newtx, uint32_t& n_bytes_prio) @@ -625,9 +625,9 @@ void rlc_am_lte::rlc_am_lte_tx::timer_expired(uint32_t timeout_id) lock.unlock(); if (bsr_callback) { - uint32_t newtx = 0, priotx = 0; - get_buffer_state(newtx, priotx); - bsr_callback(parent->lcid, newtx, priotx); + uint32_t new_tx_queue = 0, prio_tx_queue = 0; + get_buffer_state(new_tx_queue, prio_tx_queue); + bsr_callback(parent->lcid, new_tx_queue, prio_tx_queue); } }