Skip to content

Commit 974a1b1

Browse files
authored
Use less common variable name in macro (ros2#550)
Signed-off-by: Shane Loretz <sloretz@intrinsic.ai>
1 parent cfff5e5 commit 974a1b1

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎include/rcutils/error_handling.h‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,9 @@ rcutils_set_error_state(const char * error_string, const char * file, size_t lin
240240
#define RCUTILS_SET_ERROR_MSG_WITH_FORMAT_STRING(format_string, ...) \
241241
do { \
242242
char output_msg[RCUTILS_ERROR_MESSAGE_MAX_LENGTH]; \
243-
int ret = rcutils_snprintf(output_msg, sizeof(output_msg), format_string, __VA_ARGS__); \
244-
if (ret < 0) { \
243+
int __rcutils_snprintf_ret = \
244+
rcutils_snprintf(output_msg, sizeof(output_msg), format_string, __VA_ARGS__); \
245+
if (__rcutils_snprintf_ret < 0) { \
245246
RCUTILS_SAFE_FWRITE_TO_STDERR("Failed to call snprintf for error message formatting\n"); \
246247
} else { \
247248
RCUTILS_SET_ERROR_MSG(output_msg); \

0 commit comments

Comments
 (0)