Skip to content

Commit

Permalink
multipathd: fix an unsigned int ovwerflow
Browse files Browse the repository at this point in the history
Reported by coverity: "i--" may cause an underflow, which will again
cause an overflow when the loop continues. Use a signed int for
loops like this to make coverity happy.

Signed-off-by: Martin Wilck <mwilck@suse.com>
  • Loading branch information
mwilck committed Nov 13, 2024
1 parent e68fb43 commit 4c3ade2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion multipathd/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2086,7 +2086,7 @@ static void
deferred_failback_tick (struct vectors *vecs)
{
struct multipath * mpp;
unsigned int i;
int i;
bool need_reload;

vector_foreach_slot (vecs->mpvec, mpp, i) {
Expand Down

0 comments on commit 4c3ade2

Please sign in to comment.