libmultipath: make vector_foreach_slot_backwards work as expected
authorBenjamin Marzinski <bmarzins@redhat.com>
Fri, 23 Aug 2019 17:48:45 +0000 (12:48 -0500)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Tue, 1 Oct 2019 19:58:20 +0000 (21:58 +0200)
commit0ca949b1d5cc3a309065680691ebe3e71bc7d53b
treeb5f183f31f429ab48bd9d7fd3ea8c1eb99912847
parent129e6fe6b5310052c45f7bbf3741103f12d3ec84
libmultipath: make vector_foreach_slot_backwards work as expected

All of the code that uses vector_foreach_slot_backwards() treats "i" as
the index of the entry "p", but the way it was coded, that wasn't the
case. "i" was the number of the entry counting from 1, not 0.

Reviewed-by: Martin Wilck <mwilck@suse.com>
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
libmultipath/vector.h