Skip to content
Snippets Groups Projects
Commit 141577c8 authored by Robert Schmidt's avatar Robert Schmidt
Browse files

Refactor code and make shorter through ternary operator

parent 279bd179
No related branches found
No related tags found
2 merge requests!2839Integration: `2024.w27`,!2835Demote logs for NR band and duplex spacing
...@@ -644,14 +644,8 @@ int get_dmrs_port(int nl, uint16_t dmrs_ports) ...@@ -644,14 +644,8 @@ int get_dmrs_port(int nl, uint16_t dmrs_ports)
frame_type_t get_frame_type(uint16_t current_band, uint8_t scs_index) frame_type_t get_frame_type(uint16_t current_band, uint8_t scs_index)
{ {
frame_type_t current_type;
int32_t delta_duplex = get_delta_duplex(current_band, scs_index); int32_t delta_duplex = get_delta_duplex(current_band, scs_index);
frame_type_t current_type = delta_duplex == 0 ? TDD : FDD;
if (delta_duplex == 0)
current_type = TDD;
else
current_type = FDD;
LOG_D(NR_MAC, "NR band %d, duplex mode %s, duplex spacing = %d KHz\n", current_band, duplex_mode[current_type], delta_duplex); LOG_D(NR_MAC, "NR band %d, duplex mode %s, duplex spacing = %d KHz\n", current_band, duplex_mode[current_type], delta_duplex);
return current_type; return current_type;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment