Commit b8e377d4 authored by Robert Schmidt's avatar Robert Schmidt

Add single assert to check for validity in code

parent 0bf96c9b
...@@ -2077,6 +2077,7 @@ uint8_t compute_nr_root_seq(NR_RACH_ConfigCommon_t *rach_config, ...@@ -2077,6 +2077,7 @@ uint8_t compute_nr_root_seq(NR_RACH_ConfigCommon_t *rach_config,
if (NCS == 0) return nb_preambles; if (NCS == 0) return nb_preambles;
else { else {
r = L_ra/NCS; r = L_ra/NCS;
AssertFatal(r > 0, "bad r: L_ra %d, NCS %d\n", L_ra, NCS);
found_sequences = (nb_preambles/r) + (nb_preambles%r!=0); //ceil(nb_preambles/r) found_sequences = (nb_preambles/r) + (nb_preambles%r!=0); //ceil(nb_preambles/r)
LOG_D(MAC, "Computing NR root sequences: found %u sequences\n", found_sequences); LOG_D(MAC, "Computing NR root sequences: found %u sequences\n", found_sequences);
return (found_sequences); return (found_sequences);
......
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