[v1] examples/vm_power_manager: fix unreachable code
Checks
Commit Message
A for loop to MAX_VFS had a break as the last line, so the w++
would never get called, breaking out of the loop after the
first iteration. Remove the break so that the loop can execute
properly.
Fixes: ace158c4a821 ("examples/vm_power: add check for port count")
Coverity issue: 337682
Signed-off-by: David Hunt <david.hunt@intel.com>
---
examples/vm_power_manager/main.c | 1 -
1 file changed, 1 deletion(-)
Comments
David Hunt <david.hunt@intel.com>:
> A for loop to MAX_VFS had a break as the last line, so the w++
> would never get called, breaking out of the loop after the
> first iteration. Remove the break so that the loop can execute
> properly.
>
> Fixes: ace158c4a821 ("examples/vm_power: add check for port count")
> Coverity issue: 337682
>
> Signed-off-by: David Hunt <david.hunt@intel.com>
> ---
>
Acked-by: Rami Rosen <ramirose@gmail.com>
> > A for loop to MAX_VFS had a break as the last line, so the w++
> > would never get called, breaking out of the loop after the
> > first iteration. Remove the break so that the loop can execute
> > properly.
> >
> > Fixes: ace158c4a821 ("examples/vm_power: add check for port count")
> > Coverity issue: 337682
> >
> > Signed-off-by: David Hunt <david.hunt@intel.com>
>
> Acked-by: Rami Rosen <ramirose@gmail.com>
Applied, thanks
@@ -390,7 +390,6 @@ main(int argc, char **argv)
break;
}
printf("\n");
- break;
}
}
}