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:
parent
e521d5c838
commit
5c959c6136
1 changed files with 2 additions and 4 deletions
|
@ -73,10 +73,8 @@ static void counter_isr(const void *arg)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_top_set && (current_value == top.ticks)) {
|
if (is_top_set && (current_value == top.ticks) && top.callback) {
|
||||||
if (top.callback) {
|
top.callback(dev_p, top.user_data);
|
||||||
top.callback(dev_p, top.user_data);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
schedule_next_isr();
|
schedule_next_isr();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue