Skip to content

Commit

Permalink
uncrustify
Browse files Browse the repository at this point in the history
  • Loading branch information
wjwwood committed Nov 10, 2017
1 parent caf12a0 commit 351b248
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions include/rcutils/error_handling.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,16 +117,16 @@ rcutils_set_error_state(
* \param[in] ... Arguments for the format string.
*/
#define RCUTILS_SET_ERROR_MSG_WITH_FORMAT_STRING(allocator, format_string, ...) \
do { \
char * output_msg = NULL; \
output_msg = rcutils_format_string(allocator, format_string, __VA_ARGS__); \
if (output_msg) { \
RCUTILS_SET_ERROR_MSG(output_msg, allocator); \
allocator.deallocate(output_msg, allocator.state); \
} else { \
RCUTILS_SAFE_FWRITE_TO_STDERR("Failed to allocate memory for error message\n"); \
} \
} while (0)
do { \
char * output_msg = NULL; \
output_msg = rcutils_format_string(allocator, format_string, __VA_ARGS__); \
if (output_msg) { \
RCUTILS_SET_ERROR_MSG(output_msg, allocator); \
allocator.deallocate(output_msg, allocator.state); \
} else { \
RCUTILS_SAFE_FWRITE_TO_STDERR("Failed to allocate memory for error message\n"); \
} \
} while (0)

/// Return `true` if the error is set, otherwise `false`.
RCUTILS_PUBLIC
Expand Down

0 comments on commit 351b248

Please sign in to comment.