Commit 6861d97c authored by rmagueta's avatar rmagueta

Fix srb cppcheck errors/warnings

parent aa4f4637
...@@ -548,7 +548,7 @@ static void deliver_sdu_srb(void *_ue, nr_pdcp_entity_t *entity, ...@@ -548,7 +548,7 @@ static void deliver_sdu_srb(void *_ue, nr_pdcp_entity_t *entity,
int srb_id; int srb_id;
int i; int i;
for (i = 0; i < 3; i++) { for (i = 0; i < 2; i++) {
if (entity == ue->srb[i]) { if (entity == ue->srb[i]) {
srb_id = i+1; srb_id = i+1;
goto srb_found; goto srb_found;
...@@ -591,7 +591,7 @@ static void deliver_pdu_srb(void *_ue, nr_pdcp_entity_t *entity, ...@@ -591,7 +591,7 @@ static void deliver_pdu_srb(void *_ue, nr_pdcp_entity_t *entity,
int i; int i;
mem_block_t *memblock; mem_block_t *memblock;
for (i = 0; i < 3; i++) { for (i = 0; i < 2; i++) {
if (entity == ue->srb[i]) { if (entity == ue->srb[i]) {
srb_id = i+1; srb_id = i+1;
goto srb_found; goto srb_found;
...@@ -1096,7 +1096,7 @@ void pdcp_config_set_security( ...@@ -1096,7 +1096,7 @@ void pdcp_config_set_security(
/* TODO: proper handling of DRBs, for the moment only SRBs are handled */ /* TODO: proper handling of DRBs, for the moment only SRBs are handled */
if (rb_id >= 1 && rb_id <= 3) { if (rb_id >= 1 && rb_id <= 2) {
rb = ue->srb[rb_id - 1]; rb = ue->srb[rb_id - 1];
if (rb == NULL) { if (rb == NULL) {
...@@ -1146,7 +1146,7 @@ static boolean_t pdcp_data_req_srb( ...@@ -1146,7 +1146,7 @@ static boolean_t pdcp_data_req_srb(
ue = nr_pdcp_manager_get_ue(nr_pdcp_ue_manager, rnti); ue = nr_pdcp_manager_get_ue(nr_pdcp_ue_manager, rnti);
if (rb_id < 1 || rb_id > 3) if (rb_id < 1 || rb_id > 2)
rb = NULL; rb = NULL;
else else
rb = ue->srb[rb_id - 1]; rb = ue->srb[rb_id - 1];
......
...@@ -28,7 +28,7 @@ typedef void nr_pdcp_ue_manager_t; ...@@ -28,7 +28,7 @@ typedef void nr_pdcp_ue_manager_t;
typedef struct nr_pdcp_ue_t { typedef struct nr_pdcp_ue_t {
int rnti; int rnti;
nr_pdcp_entity_t *srb[3]; nr_pdcp_entity_t *srb[2];
nr_pdcp_entity_t *drb[5]; nr_pdcp_entity_t *drb[5];
} nr_pdcp_ue_t; } nr_pdcp_ue_t;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment