Commit 81982725 authored by Robert Schmidt's avatar Robert Schmidt Committed by francescomani

Review remarks

parent 931cf0a8
...@@ -292,7 +292,7 @@ static inline notifiedFIFO_elt_t *pullTpool(notifiedFIFO_t *responseFifo, tpool_ ...@@ -292,7 +292,7 @@ static inline notifiedFIFO_elt_t *pullTpool(notifiedFIFO_t *responseFifo, tpool_
if (t->traceFd > 0) { if (t->traceFd > 0) {
ssize_t b = write(t->traceFd, msg, sizeof(*msg)); ssize_t b = write(t->traceFd, msg, sizeof(*msg));
AssertFatal(b > 0, "error in write(): %d, %s\n", errno, strerror(errno)); AssertFatal(b == sizeof(*msg), "error in write(): %d, %s\n", errno, strerror(errno));
} }
return msg; return msg;
...@@ -309,7 +309,7 @@ static inline notifiedFIFO_elt_t *tryPullTpool(notifiedFIFO_t *responseFifo, tpo ...@@ -309,7 +309,7 @@ static inline notifiedFIFO_elt_t *tryPullTpool(notifiedFIFO_t *responseFifo, tpo
if (t->traceFd > 0) { if (t->traceFd > 0) {
ssize_t b = write(t->traceFd, msg, sizeof(*msg)); ssize_t b = write(t->traceFd, msg, sizeof(*msg));
AssertFatal(b > 0, "error in write(): %d, %s\n", errno, strerror(errno)); AssertFatal(b == sizeof(*msg), "error in write(): %d, %s\n", errno, strerror(errno));
} }
return msg; return msg;
......
...@@ -140,10 +140,11 @@ schedule_MBMS_NFAPI(module_id_t module_idP, uint8_t CC_id, frame_t frameP, ...@@ -140,10 +140,11 @@ schedule_MBMS_NFAPI(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
mac_rlc_status_resp_t rlc_status; mac_rlc_status_resp_t rlc_status;
int num_mtch=0; int num_mtch=0;
int msi_length=0, i, k; int msi_length=0, i, k;
int8_t j = -1;
unsigned char sdu_lcids[11], num_sdus = 0, offset = 0; unsigned char sdu_lcids[11], num_sdus = 0, offset = 0;
uint16_t sdu_lengths[11], sdu_length_total = 0; uint16_t sdu_lengths[11], sdu_length_total = 0;
unsigned char mch_buffer[MAX_DLSCH_PAYLOAD_BYTES]; // check the max value, this is for dlsch only unsigned char mch_buffer[MAX_DLSCH_PAYLOAD_BYTES]; // check the max value, this is for dlsch only
int16_t j = -1;
COMMON_channels_t *cc = &RC.mac[module_idP]->common_channels[CC_id]; COMMON_channels_t *cc = &RC.mac[module_idP]->common_channels[CC_id];
...@@ -1124,7 +1125,8 @@ schedule_MBMS(module_id_t module_idP, uint8_t CC_id, frame_t frameP, ...@@ -1124,7 +1125,8 @@ schedule_MBMS(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
unsigned char sdu_lcids[11], num_sdus = 0, offset = 0; unsigned char sdu_lcids[11], num_sdus = 0, offset = 0;
uint16_t sdu_lengths[11], sdu_length_total = 0; uint16_t sdu_lengths[11], sdu_length_total = 0;
unsigned char mch_buffer[MAX_DLSCH_PAYLOAD_BYTES]; // check the max value, this is for dlsch only unsigned char mch_buffer[MAX_DLSCH_PAYLOAD_BYTES]; // check the max value, this is for dlsch only
int8_t j = -1; int16_t j = -1;
COMMON_channels_t *cc = &RC.mac[module_idP]->common_channels[CC_id]; COMMON_channels_t *cc = &RC.mac[module_idP]->common_channels[CC_id];
cc->MCH_pdu.Pdu_size = 0; cc->MCH_pdu.Pdu_size = 0;
......
...@@ -1950,7 +1950,8 @@ rrc_ue_process_rrcConnectionReconfiguration( ...@@ -1950,7 +1950,8 @@ rrc_ue_process_rrcConnectionReconfiguration(
uint8_t *buffer; uint8_t *buffer;
} msg; } msg;
msg.buffer = calloc(total_size, sizeof(uint8_t)); msg.buffer = calloc(total_size, sizeof(*msg.buffer));
AssertFatal(msg.buffer != NULL, "Error in memory allocation\n");
msg.RadioBearer_size = nr_RadioBearer->size; msg.RadioBearer_size = nr_RadioBearer->size;
msg.SecondaryCellGroup_size = nr_SecondaryCellGroup->size; msg.SecondaryCellGroup_size = nr_SecondaryCellGroup->size;
msg.trans_id = rrcConnectionReconfiguration->rrc_TransactionIdentifier; msg.trans_id = rrcConnectionReconfiguration->rrc_TransactionIdentifier;
......
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