diff mbox series

[23/41] libmultipath: rename enum values with double underscores in structs.h

Message ID 20240808152620.93965-24-mwilck@suse.com (mailing list archive)
State Not Applicable, archived
Delegated to: christophe varoqui
Headers show
Series multipath-tools: comply with C library reserved names | expand

Commit Message

Martin Wilck Aug. 8, 2024, 3:26 p.m. UTC
Signed-off-by: Martin Wilck <mwilck@suse.com>
---
 libmultipath/dict.c    | 4 ++--
 libmultipath/print.c   | 2 +-
 libmultipath/structs.h | 4 ++--
 libmultipath/valid.c   | 2 +-
 tests/mpathvalid.c     | 2 +-
 5 files changed, 7 insertions(+), 7 deletions(-)
diff mbox series

Patch

diff --git a/libmultipath/dict.c b/libmultipath/dict.c
index 546103f..a06a613 100644
--- a/libmultipath/dict.c
+++ b/libmultipath/dict.c
@@ -568,7 +568,7 @@  def_find_multipaths_handler(struct config *conf, vector strvec,
 	if (!buff)
 		return 1;
 
-	for (i = FIND_MULTIPATHS_OFF; i < __FIND_MULTIPATHS_LAST; i++) {
+	for (i = FIND_MULTIPATHS_OFF; i < FIND_MULTIPATHS_LAST__; i++) {
 		if (find_multipaths_optvals[i] != NULL &&
 		    !strcmp(buff, find_multipaths_optvals[i])) {
 			conf->find_multipaths = i;
@@ -576,7 +576,7 @@  def_find_multipaths_handler(struct config *conf, vector strvec,
 		}
 	}
 
-	if (i >= __FIND_MULTIPATHS_LAST) {
+	if (i >= FIND_MULTIPATHS_LAST__) {
 		if (strcmp(buff, "no") == 0 || strcmp(buff, "0") == 0)
 			conf->find_multipaths = FIND_MULTIPATHS_OFF;
 		else if (strcmp(buff, "yes") == 0 || strcmp(buff, "1") == 0)
diff --git a/libmultipath/print.c b/libmultipath/print.c
index b911802..b8868ea 100644
--- a/libmultipath/print.c
+++ b/libmultipath/print.c
@@ -575,7 +575,7 @@  static int snprint_initialized(struct strbuf *buff, const struct path * pp)
 	};
 	const char *str;
 
-	if (pp->initialized < INIT_NEW || pp->initialized >= __INIT_LAST)
+	if (pp->initialized < INIT_NEW || pp->initialized >= INIT_LAST__)
 		str = "undef";
 	else
 		str = init_state_name[pp->initialized];
diff --git a/libmultipath/structs.h b/libmultipath/structs.h
index 6b5de7a..56fb74b 100644
--- a/libmultipath/structs.h
+++ b/libmultipath/structs.h
@@ -99,7 +99,7 @@  enum find_multipaths_states {
 	FIND_MULTIPATHS_GREEDY,
 	FIND_MULTIPATHS_SMART,
 	FIND_MULTIPATHS_STRICT,
-	__FIND_MULTIPATHS_LAST,
+	FIND_MULTIPATHS_LAST__,
 };
 
 enum marginal_pathgroups_mode {
@@ -258,7 +258,7 @@  enum initialized_states {
 	 * change uevent is received.
 	 */
 	INIT_PARTIAL,
-	__INIT_LAST,
+	INIT_LAST__,
 };
 
 enum prkey_sources {
diff --git a/libmultipath/valid.c b/libmultipath/valid.c
index d751780..5df9b02 100644
--- a/libmultipath/valid.c
+++ b/libmultipath/valid.c
@@ -302,7 +302,7 @@  is_path_valid(const char *name, struct config *conf, struct path *pp,
 		return PATH_IS_ERROR;
 
 	if (conf->find_multipaths <= FIND_MULTIPATHS_UNDEF ||
-	    conf->find_multipaths >= __FIND_MULTIPATHS_LAST)
+	    conf->find_multipaths >= FIND_MULTIPATHS_LAST__)
 		return PATH_IS_ERROR;
 
 	if (safe_sprintf(pp->dev, "%s", name))
diff --git a/tests/mpathvalid.c b/tests/mpathvalid.c
index df66ed6..134dfc9 100644
--- a/tests/mpathvalid.c
+++ b/tests/mpathvalid.c
@@ -130,7 +130,7 @@  void make_config_file(int findmp)
 	char buf[64];
 
 	assert_true(findmp > FIND_MULTIPATHS_UNDEF &&
-		    findmp < __FIND_MULTIPATHS_LAST);
+		    findmp < FIND_MULTIPATHS_LAST__);
 
 	r = snprintf(buf, sizeof(buf), "defaults {\nfind_multipaths %s\n}\n",
 		     find_multipaths_optvals[findmp]);