From c4f8ff15615c85ff0a0712d745e9c77d76405011 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 29 Oct 2020 16:29:28 +0100 Subject: [PATCH] Assert on condition UE not found in UE_list --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c index 41fafd268b..f677b15576 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c @@ -1692,8 +1692,7 @@ inline int remove_nr_ue_list(NR_UE_list_t *listP, int UE_id) { int *cur = &listP->head; while (*cur != -1 && *cur != UE_id) cur = &listP->next[*cur]; - if (*cur == -1) - return 0; + AssertFatal(*cur != -1, "UE %d not found in UE_list\n", UE_id); int *next = &listP->next[*cur]; *cur = listP->next[*cur]; *next = -1;