From 7083e08175c8ee78ffbf5d88fe4642aa7759d525 Mon Sep 17 00:00:00 2001 From: Guido Casati Date: Mon, 22 Sep 2025 22:30:09 +0200 Subject: [PATCH] Fix variable shadowing in E1 bearer context setup - Changed inner loop variable from 'i' to 'j' in rrc_gNB_process_e1_bearer_context_setup_resp - Eliminates variable shadowing between outer PDU session loop and inner DRB loop - Improves code readability and prevents potential bugs --- openair2/RRC/NR/rrc_gNB.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openair2/RRC/NR/rrc_gNB.c b/openair2/RRC/NR/rrc_gNB.c index 797aa19d88..2ade816666 100644 --- a/openair2/RRC/NR/rrc_gNB.c +++ b/openair2/RRC/NR/rrc_gNB.c @@ -2577,8 +2577,8 @@ void rrc_gNB_process_e1_bearer_context_setup_resp(e1ap_bearer_setup_resp_t *resp rrc_pdu->param.n3_outgoing = f1u_gtp_update(e1_pdu->tl_info.teId, e1_pdu->tl_info.tlAddress); // save the tunnel address for the DRBs - for (int i = 0; i < e1_pdu->numDRBSetup; i++) { - DRB_nGRAN_setup_t *drb_config = &e1_pdu->DRBnGRanList[i]; + for (int j = 0; j < e1_pdu->numDRBSetup; j++) { + DRB_nGRAN_setup_t *drb_config = &e1_pdu->DRBnGRanList[j]; // numUpParam only relevant in F1, but not monolithic AssertFatal(drb_config->numUpParam <= 1, "can only up to one UP param\n"); drb_t *drb = get_drb(UE, drb_config->id);