From eeb399177a20c60c2fce9b8e7a323ed44c3520bb Mon Sep 17 00:00:00 2001 From: Eurecom <eurecom@smtp.eurecom.fr> Date: Wed, 20 Dec 2017 11:02:05 +0100 Subject: [PATCH] lte_sync_time assertFatal added --- openair1/PHY/LTE_ESTIMATION/lte_sync_time.c | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/openair1/PHY/LTE_ESTIMATION/lte_sync_time.c b/openair1/PHY/LTE_ESTIMATION/lte_sync_time.c index c7625ba083e..1a46c3b9481 100644 --- a/openair1/PHY/LTE_ESTIMATION/lte_sync_time.c +++ b/openair1/PHY/LTE_ESTIMATION/lte_sync_time.c @@ -356,20 +356,12 @@ int lte_sync_time(int **rxdata, ///rx data in time domain int length = LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*frame_parms->samples_per_tti>>1; //LOG_D(PHY,"[SYNC TIME] Calling sync_time.\n"); - if (sync_corr_ue0 == NULL) { - LOG_E(PHY,"[SYNC TIME] sync_corr_ue0 not yet allocated! Exiting.\n"); - return(-1); - } - - if (sync_corr_ue1 == NULL) { - LOG_E(PHY,"[SYNC TIME] sync_corr_ue1 not yet allocated! Exiting.\n"); - return(-1); - } - - if (sync_corr_ue2 == NULL) { - LOG_E(PHY,"[SYNC TIME] sync_corr_ue2 not yet allocated! Exiting.\n"); - return(-1); - } + AssertFatal(sync_corr_ue0 != NULL, + "sync_corr_ue0 not yet allocated! Exiting.\n"); + AssertFatal(sync_corr_ue1 != NULL, + "sync_corr_ue0 not yet allocated! Exiting.\n"); + AssertFatal(sync_corr_ue2 != NULL, + "sync_corr_ue0 not yet allocated! Exiting.\n"); peak_val = 0; peak_pos = 0; -- GitLab