diff options
author | Stefan Sperling <ssperling@sysmocom.de> | 2018-02-06 18:00:02 +0100 |
---|---|---|
committer | Stefan Sperling <ssperling@sysmocom.de> | 2018-02-06 18:00:02 +0100 |
commit | 519f8beccf2fee905499d8560113d5075d0be02e (patch) | |
tree | 18f85dfa3e0a59a22befcb5ddc4c170356bc06e1 /src/libcommon | |
parent | e2db0c6181d4d959da16a3a1504da1a7831b9f1f (diff) |
rename a variable and improve comments
Change-Id: I8f14eecd0b7e2e76547804da665cd254628fee2b
Diffstat (limited to 'src/libcommon')
-rw-r--r-- | src/libcommon/acc_ramp.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libcommon/acc_ramp.c b/src/libcommon/acc_ramp.c index 0c96fbf60..20286b505 100644 --- a/src/libcommon/acc_ramp.c +++ b/src/libcommon/acc_ramp.c @@ -86,15 +86,15 @@ static void do_ramping_step(void *data) /* Allow 'step_size' ACCs, starting from ACC0. ACC9 will be allowed last. */ for (i = 0; i < acc_ramp->step_size; i++) { - int c = ffs(acc_ramp->barred_t3); - if (c <= 0) { - c = ffs(acc_ramp->barred_t2); - if (c == 1 || c == 2) /* ACC8 or ACC9 */ - allow_one_acc(acc_ramp, c - 1 + 8); + int idx = ffs(acc_ramp->barred_t3); + if (idx <= 0) { + idx = ffs(acc_ramp->barred_t2); + if (idx == 1 || idx == 2) /* ACC8 or ACC9 is still barred */ + allow_one_acc(acc_ramp, idx - 1 + 8); else break; /* all ACCs are now allowed */ } else - allow_one_acc(acc_ramp, c - 1); /* ACC0-ACC7 */ + allow_one_acc(acc_ramp, idx - 1); /* one of ACC0-ACC7 is still bared */ } /* If we have not allowed all ACCs yet, schedule another ramping step. */ |