Commit 275c3c6a authored by mir's avatar mir

Bugfix cmax and memory init

parent fc8d0c59
......@@ -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); \
......
......@@ -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; aa<nb_rx; aa++) {
if (ru->if_south == LOCAL_RF || ru->function == NGFI_RAU_IF5) { // set the time-domain signal if we have to use it in this node
......
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment