fix(esp_timer): Fix Coverity issue - logically dead code in esp_timer_impl_early_init

This commit is contained in:
Konstantin Kondrashov
2024-05-22 11:20:08 +03:00
parent 60532e7a80
commit a800fcb47e

View File

@@ -181,7 +181,8 @@ esp_err_t esp_timer_impl_early_init(void)
systimer_hal_connect_alarm_counter(&systimer_hal, SYSTIMER_ALARM_ESPTIMER, SYSTIMER_COUNTER_ESPTIMER);
for (unsigned cpuid = 0; cpuid < SOC_CPU_CORES_NUM; ++cpuid) {
systimer_hal_counter_can_stall_by_cpu(&systimer_hal, SYSTIMER_COUNTER_ESPTIMER, cpuid, (cpuid < portNUM_PROCESSORS) ? true : false);
bool can_stall = (cpuid < portNUM_PROCESSORS);
systimer_hal_counter_can_stall_by_cpu(&systimer_hal, SYSTIMER_COUNTER_ESPTIMER, cpuid, can_stall);
}
return ESP_OK;