diff --git a/common/utils/utils.h b/common/utils/utils.h index a5976fd904..6687249077 100644 --- a/common/utils/utils.h +++ b/common/utils/utils.h @@ -25,7 +25,7 @@ extern "C" { _a > _b ? _a : _b; }) -#define cmax3(a,b,c) ( cmax(cmax(a,b), cmax(b,c)) ) +#define cmax3(a,b,c) ( cmax(cmax(a,b), c) ) // Prevent double evaluation in min macro #define cmin(a,b) ({ __typeof__ (a) _a = (a); \ diff --git a/openair1/PHY/LTE_TRANSPORT/prach.c b/openair1/PHY/LTE_TRANSPORT/prach.c index 2d3f964ef5..ec5fa88d94 100644 --- a/openair1/PHY/LTE_TRANSPORT/prach.c +++ b/openair1/PHY/LTE_TRANSPORT/prach.c @@ -171,7 +171,7 @@ void rx_prach0(PHY_VARS_eNB *eNB, AssertFatal(ru!=NULL,"ru is null\n"); int8_t dBEn0=0; int16_t *prach[nb_rx]; - memset(prach, 0, nb_rx * sizeof(int16_t)); + memset(prach, 0, nb_rx * sizeof(int16_t*)); for (int aa=0; aaif_south == LOCAL_RF || ru->function == NGFI_RAU_IF5) { // set the time-domain signal if we have to use it in this node diff --git a/openair1/PHY/NR_TRANSPORT/pucch_rx.c b/openair1/PHY/NR_TRANSPORT/pucch_rx.c index 62b564808a..e930a46a08 100644 --- a/openair1/PHY/NR_TRANSPORT/pucch_rx.c +++ b/openair1/PHY/NR_TRANSPORT/pucch_rx.c @@ -225,7 +225,7 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB, x_im[1] = table_5_2_2_2_2_Im[u[1]]; c64_t xr[frame_parms->nb_antennas_rx][pucch_pdu->nr_of_symbols][12] __attribute__((aligned(32))); - memset(xr, 0, frame_parms->nb_antennas_rx * pucch_pdu->nr_of_symbols * 12); + memset(xr, 0, frame_parms->nb_antennas_rx * pucch_pdu->nr_of_symbols * 12 * sizeof(c64_t)); int64_t xrtmag=0,xrtmag_next=0; uint8_t maxpos=0;