fix bugs reported by coverity

master
Andre Puschmann 6 years ago
parent 04f6569113
commit 2590ebd10b

@ -29,14 +29,16 @@
namespace srslte { namespace srslte {
rlc_tm::rlc_tm(uint32_t queue_len) : ul_queue(queue_len) rlc_tm::rlc_tm(uint32_t queue_len) :
ul_queue(queue_len),
tx_enabled(false),
log(NULL),
pdcp(NULL),
rrc(NULL),
lcid(0),
num_tx_bytes(0),
num_rx_bytes(0)
{ {
log = NULL;
pdcp = NULL;
rrc = NULL;
lcid = 0;
num_tx_bytes = 0;
num_rx_bytes = 0;
pool = byte_buffer_pool::get_instance(); pool = byte_buffer_pool::get_instance();
} }

@ -68,7 +68,7 @@ private:
const static int sf_buffer_sz = 128*1024; const static int sf_buffer_sz = 128*1024;
class sf_buffer { class sf_buffer {
public: public:
sf_buffer() { nof_samples = 0; tti = 0; } sf_buffer() { nof_samples = 0; tti = 0; bzero(samples, sizeof(samples)); }
void reset() { nof_samples = 0; tti = 0; } void reset() { nof_samples = 0; tti = 0; }
cf_t samples[sf_buffer_sz]; cf_t samples[sf_buffer_sz];
uint32_t nof_samples; uint32_t nof_samples;

@ -280,7 +280,9 @@ public:
nsegm_dcch = 0; nsegm_dcch = 0;
si_window_len = 0; si_window_len = 0;
sib2_period = 0; sib2_period = 0;
send_ack = 0; send_ack = 0;
bzero(&bit_msg, sizeof(bit_msg));
bzero(&byte_msg, sizeof(byte_msg));
} }
bool has_data(uint32_t lcid) { bool has_data(uint32_t lcid) {
return get_buffer_state(lcid); return get_buffer_state(lcid);

Loading…
Cancel
Save