From 486cebce06bca3e99e08d40a6870086f9c775b01 Mon Sep 17 00:00:00 2001 From: Laurent THOMAS Date: Wed, 6 Nov 2024 15:45:27 +0100 Subject: [PATCH] replace a printf() by a cleaner call to AssertFatal() --- openair1/PHY/TOOLS/tools_defs.h | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/openair1/PHY/TOOLS/tools_defs.h b/openair1/PHY/TOOLS/tools_defs.h index 772dd54e8b..8799188c99 100644 --- a/openair1/PHY/TOOLS/tools_defs.h +++ b/openair1/PHY/TOOLS/tools_defs.h @@ -618,17 +618,15 @@ typedef enum dft_size_idx { case Sz: \ return DFT_##Sz; \ break; -static inline -dft_size_idx_t get_dft(int ofdm_symbol_size) +static inline dft_size_idx_t get_dft(int size) { - switch (ofdm_symbol_size) { + switch (size) { FOREACH_DFTSZ(FIND_ENUM) default: - printf("function get_dft : unsupported ofdm symbol size \n"); - assert(0); + AssertFatal(false, "function get_dft : unsupported DFT size %d\n", size); break; } - return DFT_SIZE_IDXTABLESIZE; // never reached and will trigger assertion in idft function; + return DFT_SIZE_IDXTABLESIZE; } #define SZ_iENUM(Sz) IDFT_##Sz, @@ -678,14 +676,12 @@ struct { return IDFT_##iSz; \ break; -static inline -idft_size_idx_t get_idft(int ofdm_symbol_size) +static inline idft_size_idx_t get_idft(int size) { - switch (ofdm_symbol_size) { + switch (size) { FOREACH_IDFTSZ(FIND_iENUM) default: - printf("function get_idft : unsupported ofdm symbol size \n"); - assert(0); + AssertFatal(false, "function get_idft : unsupported iDFT size %d\n", size); break; } return IDFT_SIZE_IDXTABLESIZE; // never reached and will trigger assertion in idft function