diff mbox series

[10/41] libmpathutil: rename _MAX_CMD_LEN

Message ID 20240808152620.93965-11-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:25 p.m. UTC
Signed-off-by: Martin Wilck <mwilck@suse.com>
---
 libdmmp/libdmmp.c     | 2 +-
 libmpathutil/uxsock.h | 2 +-
 multipathd/uxlsnr.c   | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/libdmmp/libdmmp.c b/libdmmp/libdmmp.c
index fcfba06..1bfdbed 100644
--- a/libdmmp/libdmmp.c
+++ b/libdmmp/libdmmp.c
@@ -46,7 +46,7 @@ 
 #define _DMMP_JSON_MAPS_KEY			"maps"
 #define _ERRNO_STR_BUFF_SIZE			256
 #define _IPC_MAX_CMD_LEN			512
-/* ^ Was _MAX_CMD_LEN in ./libmultipath/uxsock.h */
+/* ^ Was MAX_CMD_LEN in ./libmultipath/uxsock.h */
 #define _LAST_ERR_MSG_BUFF_SIZE			1024
 
 struct dmmp_context {
diff --git a/libmpathutil/uxsock.h b/libmpathutil/uxsock.h
index 8157060..1726a96 100644
--- a/libmpathutil/uxsock.h
+++ b/libmpathutil/uxsock.h
@@ -6,5 +6,5 @@  int ux_socket_listen(const char *name);
 int send_packet(int fd, const char *buf);
 int recv_packet(int fd, char **buf, unsigned int timeout);
 
-#define _MAX_CMD_LEN		512
+#define MAX_CMD_LEN		512
 #endif
diff --git a/multipathd/uxlsnr.c b/multipathd/uxlsnr.c
index 185e0a0..198f382 100644
--- a/multipathd/uxlsnr.c
+++ b/multipathd/uxlsnr.c
@@ -59,7 +59,7 @@  struct client {
 	int fd;
 	vector cmdvec;
 	/* NUL byte at end */
-	char cmd[_MAX_CMD_LEN + 1];
+	char cmd[MAX_CMD_LEN + 1];
 	struct strbuf reply;
 	struct handler *handler;
 	size_t cmd_len, len;
@@ -477,7 +477,7 @@  static int client_state_machine(struct client *c, struct vectors *vecs,
 				condlog(1, "%s: cli[%d]: failed to receive reply len: %zd",
 					__func__, c->fd, n);
 				c->error = -ECONNRESET;
-			} else if (len <= 0 || len > _MAX_CMD_LEN) {
+			} else if (len <= 0 || len > MAX_CMD_LEN) {
 				condlog(1, "%s: cli[%d]: invalid command length (%zu bytes)",
 					__func__, c->fd, len);
 				c->error = -ECONNRESET;