Skip to content

Commit 5c959c6

Browse files
aescolarkartben
authored andcommitted
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>
1 parent e521d5c commit 5c959c6

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/counter/counter_native_sim.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,8 @@ static void counter_isr(const void *arg)
7373
}
7474
}
7575

76-
if (is_top_set && (current_value == top.ticks)) {
77-
if (top.callback) {
78-
top.callback(dev_p, top.user_data);
79-
}
76+
if (is_top_set && (current_value == top.ticks) && top.callback) {
77+
top.callback(dev_p, top.user_data);
8078
}
8179

8280
schedule_next_isr();

0 commit comments

Comments
 (0)