From 9cf288f6f3679e0c33df7f67a01a111b6c862faa Mon Sep 17 00:00:00 2001
From: Cedric Roux <cedric.roux@eurecom.fr>
Date: Fri, 19 May 2017 16:29:07 +0200
Subject: [PATCH] pre-integration fix: minor improvement

we can compute CCE_max_used_index out of the loop.
---
 openair1/PHY/LTE_TRANSPORT/dci.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/openair1/PHY/LTE_TRANSPORT/dci.c b/openair1/PHY/LTE_TRANSPORT/dci.c
index 298dbd9791..8b7a818297 100755
--- a/openair1/PHY/LTE_TRANSPORT/dci.c
+++ b/openair1/PHY/LTE_TRANSPORT/dci.c
@@ -2000,13 +2000,11 @@ uint8_t get_num_pdcch_symbols(uint8_t num_dci,
     numCCE += (1<<(dci_alloc[i].L));
 
     if(firstCCE_max < dci_alloc[i].firstCCE) {
-       firstCCE_max      = dci_alloc[i].firstCCE;
-      L                  = dci_alloc[i].L;
-    }
-    if(i == (num_dci - 1)) {
-      CCE_max_used_index = firstCCE_max + (1<<L) - 1;
+      firstCCE_max = dci_alloc[i].firstCCE;
+      L            = dci_alloc[i].L;
     }
   }
+  CCE_max_used_index = firstCCE_max + (1<<L) - 1;
 
   //if ((9*numCCE) <= (frame_parms->N_RB_DL*2))
   if (CCE_max_used_index < get_nCCE(1, frame_parms, get_mi(frame_parms, subframe)))
-- 
GitLab