Skip to content

Commit

Permalink
Use proper rcl_logging return value type and compare to constant (#916)
Browse files Browse the repository at this point in the history
Signed-off-by: Christophe Bedard <bedard.christophe@gmail.com>
  • Loading branch information
christophebedard authored Apr 29, 2021
1 parent 250a071 commit cafee72
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions rcl/src/rcl/logging.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,9 @@ rcl_logging_configure_with_output_handler(
if (g_rcl_logging_ext_lib_enabled) {
status = rcl_logging_external_initialize(config_file, g_logging_allocator);
if (RCL_RET_OK == status) {
// TODO(dirk-thomas) the return value should be typed and compared to
// constants instead of zero
int logging_status = rcl_logging_external_set_logger_level(
rcl_logging_ret_t logging_status = rcl_logging_external_set_logger_level(
NULL, default_level);
if (logging_status != 0) {
if (RCL_LOGGING_RET_OK != logging_status) {
status = RCL_RET_ERROR;
}
g_rcl_logging_out_handlers[g_rcl_logging_num_out_handlers++] =
Expand Down

0 comments on commit cafee72

Please sign in to comment.