From c9daf1f61adee9587edaf3ffce1b62b09ff91810 Mon Sep 17 00:00:00 2001 From: Ismael Gomez Date: Wed, 2 Sep 2020 18:37:15 +0200 Subject: [PATCH] Make const args --- lib/include/srslte/phy/phch/dci.h | 6 ++++-- lib/src/phy/phch/dci.c | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/include/srslte/phy/phch/dci.h b/lib/include/srslte/phy/phch/dci.h index 6cfe3e2e2..c9fd1fe7f 100644 --- a/lib/include/srslte/phy/phch/dci.h +++ b/lib/include/srslte/phy/phch/dci.h @@ -234,9 +234,11 @@ SRSLTE_API char* srslte_dci_format_string(srslte_dci_format_t format); SRSLTE_API char* srslte_dci_format_string_short(srslte_dci_format_t format); -SRSLTE_API bool srslte_location_find(srslte_dci_location_t* locations, uint32_t nof_locations, srslte_dci_location_t x); +SRSLTE_API bool +srslte_location_find(const srslte_dci_location_t* locations, uint32_t nof_locations, srslte_dci_location_t x); -SRSLTE_API bool srslte_location_find_ncce(srslte_dci_location_t* locations, uint32_t nof_locations, uint32_t ncce); +SRSLTE_API bool +srslte_location_find_ncce(const srslte_dci_location_t* locations, uint32_t nof_locations, uint32_t ncce); SRSLTE_API int srslte_dci_location_set(srslte_dci_location_t* c, uint32_t L, uint32_t nCCE); diff --git a/lib/src/phy/phch/dci.c b/lib/src/phy/phch/dci.c index 4f86ab9c0..01d93c29f 100644 --- a/lib/src/phy/phch/dci.c +++ b/lib/src/phy/phch/dci.c @@ -1385,7 +1385,7 @@ int srslte_dci_msg_unpack_pusch(srslte_cell_t* cell, return dci_format0_unpack(cell, sf, cfg, msg, dci); } -bool srslte_location_find(srslte_dci_location_t* locations, uint32_t nof_locations, srslte_dci_location_t x) +bool srslte_location_find(const srslte_dci_location_t* locations, uint32_t nof_locations, srslte_dci_location_t x) { for (uint32_t i = 0; i < nof_locations; i++) { if (locations[i].L == x.L && locations[i].ncce == x.ncce) { @@ -1395,7 +1395,7 @@ bool srslte_location_find(srslte_dci_location_t* locations, uint32_t nof_locatio return false; } -bool srslte_location_find_ncce(srslte_dci_location_t* locations, uint32_t nof_locations, uint32_t ncce) +bool srslte_location_find_ncce(const srslte_dci_location_t* locations, uint32_t nof_locations, uint32_t ncce) { for (uint32_t i = 0; i < nof_locations; i++) { if (locations[i].ncce == ncce) {