Skip to content

Commit

Permalink
Remove redundant check
Browse files Browse the repository at this point in the history
The iter variable has already passed the same check in the for statement
  • Loading branch information
keremet committed Jan 7, 2025
1 parent a90448c commit 46f5951
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions debugger/src/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,19 +200,16 @@ static void add_stack_markers(void)
int frame_index;
for (iter = stack, frame_index = 0; iter; iter = iter->next, frame_index++)
{
if (iter)
frame *f = (frame*)iter->data;
if (f->have_source)
{
frame *f = (frame*)iter->data;
if (f->have_source)
if (active_frame_index == frame_index)
{
if (active_frame_index == frame_index)
{
markers_add_current_instruction(f->file, f->line);
}
else
{
markers_add_frame(f->file, f->line);
}
markers_add_current_instruction(f->file, f->line);
}
else
{
markers_add_frame(f->file, f->line);
}
}
}
Expand Down

0 comments on commit 46f5951

Please sign in to comment.