All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Take undef enum into account for correct array index comparison
@ 2025-08-17 19:49 Alex Kalenyuk
  2025-08-18 17:19 ` Benjamin Marzinski
  0 siblings, 1 reply; 3+ messages in thread
From: Alex Kalenyuk @ 2025-08-17 19:49 UTC (permalink / raw)
  To: dm-devel; +Cc: bmarzins, mwilck

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

Signed-off-by: Alex Kalenyuk <akalenyu@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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-08-19  7:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-17 19:49 [PATCH] Take undef enum into account for correct array index comparison Alex Kalenyuk
2025-08-18 17:19 ` Benjamin Marzinski
2025-08-19  7:14   ` Alex Kalenyuk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.