diff --git a/srsue/src/stack/mac/mux.cc b/srsue/src/stack/mac/mux.cc index 6f0868741..16585ee74 100644 --- a/srsue/src/stack/mac/mux.cc +++ b/srsue/src/stack/mac/mux.cc @@ -395,7 +395,7 @@ uint8_t* mux::msg3_get(srslte::byte_buffer_t* payload, uint32_t pdu_sz) return payload->msg; } else { Error("Msg3 size exceeds buffer\n"); - return NULL; + return nullptr; } } diff --git a/srsue/src/stack/mac/proc_ra.cc b/srsue/src/stack/mac/proc_ra.cc index aed4a57ef..cd973c063 100644 --- a/srsue/src/stack/mac/proc_ra.cc +++ b/srsue/src/stack/mac/proc_ra.cc @@ -488,7 +488,7 @@ bool ra_proc::is_contention_resolution() /* Perform the actions upon completition of the RA procedure as defined in 5.1.6 */ void ra_proc::complete() { - /* Start looking for PDCCH CRNTI */ + // Start looking for PDCCH CRNTI if (!transmitted_crnti) { rntis->crnti = rntis->temp_rnti; } diff --git a/srsue/test/mac_test.cc b/srsue/test/mac_test.cc index 8be24dfc8..9cd2c8ab2 100644 --- a/srsue/test/mac_test.cc +++ b/srsue/test/mac_test.cc @@ -31,7 +31,7 @@ using namespace srsue; using namespace srslte; -#define HAVE_PCAP 1 +#define HAVE_PCAP 0 static std::unique_ptr pcap_handle = nullptr; @@ -206,8 +206,7 @@ public: { // Generate RAR to MAC - uint8_t grant[SRSLTE_RAR_GRANT_LEN] = {}; - memset(grant, 1, SRSLTE_RAR_GRANT_LEN); + uint8_t grant[SRSLTE_RAR_GRANT_LEN] = {1}; uint32_t rar_timeadv = 16; @@ -1302,9 +1301,8 @@ int mac_random_access_test() uint32 tti = 0; // Structure that defines the test to be executed - struct ra_test my_test; + struct ra_test my_test = {}; uint32_t test_id = 1; - ZERO_OBJECT(my_test); my_test.temp_rnti = 100; my_test.assume_prach_transmitted = -1;