rlc_am_lte: fix potential bug when setting uint32_t to -1

discovered in Coverity CID 359664
master
Andre Puschmann 4 years ago
parent d51a060bfa
commit 1a03839f78

@ -872,7 +872,9 @@ int rlc_am_lte::rlc_am_lte_tx::build_data_pdu(uint8_t* payload, uint32_t nof_byt
}
head_len = rlc_am_packed_length(&header);
if (head_len >= pdu_space) {
header.N_li--;
if (header.N_li > 0) {
header.N_li--;
}
break;
}
tx_sdu = tx_sdu_queue.read();

Loading…
Cancel
Save