Previously this would compare to the wrong index
since the enum has an additional UNDEF entry

Signed-off-by: Alex Kalenyuk <akale...@redhat.com>
---
 libmultipath/dict.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libmultipath/dict.c b/libmultipath/dict.c
index a06a6138..2e820b2e 100644
--- a/libmultipath/dict.c
+++ b/libmultipath/dict.c
@@ -550,6 +550,7 @@ static int snprint_def_partition_delim(struct config *conf, 
struct strbuf *buff,
 }
 
 static const char * const find_multipaths_optvals[] = {
+       [FIND_MULTIPATHS_UNDEF] = "undef",
        [FIND_MULTIPATHS_OFF] = "off",
        [FIND_MULTIPATHS_ON] = "on",
        [FIND_MULTIPATHS_STRICT] = "strict",
@@ -793,6 +794,7 @@ declare_def_snprint(allow_usb_devices, print_yes_no)
 
 
 static const char * const flush_on_last_del_optvals[] = {
+       [FLUSH_UNDEF] = "undef",
        [FLUSH_NEVER] = "never",
        [FLUSH_ALWAYS] = "always",
        [FLUSH_UNUSED] = "unused",
-- 
2.50.1


Reply via email to