drivers/counter/counter_native_sim: Merge if statements

To reduce the perceived code complexity

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This commit is contained in:
Alberto Escolar Piedras 2025-05-12 17:30:42 +02:00 committed by Benjamin Cabé
commit 5c959c6136

View file

@ -73,11 +73,9 @@ static void counter_isr(const void *arg)
}
}
if (is_top_set && (current_value == top.ticks)) {
if (top.callback) {
if (is_top_set && (current_value == top.ticks) && top.callback) {
top.callback(dev_p, top.user_data);
}
}
schedule_next_isr();
}