diff options
author | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2022-07-22 03:39:11 +0700 |
---|---|---|
committer | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2022-07-22 03:39:23 +0700 |
commit | ac8acc98a3faedd29eb515d6a66426140be4d2c0 (patch) | |
tree | 359d55f86aa71c4cff6eb97a55095490cab81679 /src/osmo-bsc | |
parent | b41ccb795e37a24169f79e177a00efe9051788af (diff) |
call osmo_timer_del() unconditionally, without osmo_timer_pending()
osmo_timer_del() does check if a timer is active internally.
Change-Id: I3e42a74d59b8e8d0d46cc4027676149689cc18a3
Diffstat (limited to 'src/osmo-bsc')
-rw-r--r-- | src/osmo-bsc/acc.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/osmo-bsc/acc.c b/src/osmo-bsc/acc.c index 1f23107aa..80a35766c 100644 --- a/src/osmo-bsc/acc.c +++ b/src/osmo-bsc/acc.c @@ -73,9 +73,8 @@ static void acc_mgr_enable_rotation_cond(struct acc_mgr *acc_mgr) if (!osmo_timer_pending(&acc_mgr->rotate_timer)) osmo_timer_schedule(&acc_mgr->rotate_timer, acc_mgr->rotation_time_sec, 0); } else { - /* No rotation needed, disable rotation timer */ - if (osmo_timer_pending(&acc_mgr->rotate_timer)) - osmo_timer_del(&acc_mgr->rotate_timer); + /* No rotation needed, disable rotation timer (if pending) */ + osmo_timer_del(&acc_mgr->rotate_timer); } } @@ -565,8 +564,7 @@ void acc_ramp_trigger(struct acc_ramp *acc_ramp) */ void acc_ramp_abort(struct acc_ramp *acc_ramp) { - if (osmo_timer_pending(&acc_ramp->step_timer)) - osmo_timer_del(&acc_ramp->step_timer); + osmo_timer_del(&acc_ramp->step_timer); acc_mgr_set_len_allowed_ramp(&acc_ramp->bts->acc_mgr, 10); } |