summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChristian Hopps <chopps@labn.net>2024-12-15 22:00:01 -0500
committerChristian Hopps <chopps@labn.net>2024-12-15 22:01:56 -0500
commita65cdb60a35205a8f9040f925e86614fe5bd4658 (patch)
tree780adecadad9cb49575b188342852511848fd39d /lib
parent73e54e4168d80588f57bf145cee924ce8ab7b381 (diff)
lib: mgmtd: use less common macro scoped variable names
- ran into problem with darr macros and nested macros using the same name variables as passed in variables in an out scope. Make these macro scoped variables more unique as well. Signed-off-by: Christian Hopps <chopps@labn.net>
Diffstat (limited to 'lib')
-rw-r--r--lib/mgmt_msg_native.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/mgmt_msg_native.h b/lib/mgmt_msg_native.h
index ef03b66edc..587a002801 100644
--- a/lib/mgmt_msg_native.h
+++ b/lib/mgmt_msg_native.h
@@ -554,8 +554,8 @@ extern int vmgmt_msg_native_send_error(struct msg_conn *conn,
*/
#define mgmt_msg_native_alloc_msg(msg_type, var_len, mem_type) \
({ \
- uint8_t *buf = NULL; \
- (msg_type *)darr_append_nz_mt(buf, \
+ uint8_t *__nam_buf = NULL; \
+ (msg_type *)darr_append_nz_mt(__nam_buf, \
sizeof(msg_type) + (var_len), \
mem_type); \
})
@@ -590,10 +590,10 @@ extern int vmgmt_msg_native_send_error(struct msg_conn *conn,
*/
#define mgmt_msg_native_append(msg, data, len) \
({ \
- uint8_t **darrp = mgmt_msg_native_get_darrp(msg); \
- uint8_t *p = darr_append_n(*darrp, len); \
- memcpy(p, data, len); \
- p; \
+ uint8_t **__na_darrp = mgmt_msg_native_get_darrp(msg); \
+ uint8_t *__na_p = darr_append_n(*__na_darrp, len); \
+ memcpy(__na_p, data, len); \
+ __na_p; \
})
/**
@@ -611,8 +611,8 @@ extern int vmgmt_msg_native_send_error(struct msg_conn *conn,
*/
#define mgmt_msg_native_add_str(msg, s) \
do { \
- int __len = strlen(s) + 1; \
- mgmt_msg_native_append(msg, s, __len); \
+ int __nas_len = strlen(s) + 1; \
+ mgmt_msg_native_append(msg, s, __nas_len); \
} while (0)
/**