Skip to content

Commit

Permalink
Use same default values at rcl_parse_arguments & rcl_arguments_copy
Browse files Browse the repository at this point in the history
Signed-off-by: y-okumura-isp <[email protected]>
  • Loading branch information
y-okumura-isp committed Feb 13, 2020
1 parent 183ad82 commit 703ec37
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions rcl/src/rcl/arguments.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,10 +338,6 @@ rcl_parse_arguments(
return ret;
}
rcl_arguments_impl_t * args_impl = args_output->impl;
args_impl->log_level = -1;
args_impl->log_stdout_disabled = false;
args_impl->log_rosout_disabled = false;
args_impl->log_ext_lib_disabled = false;

if (argc == 0) {
// there are no arguments to parse
Expand Down Expand Up @@ -2069,13 +2065,10 @@ _rcl_allocate_initialized_arguments_impl(rcl_arguments_t * args, rcl_allocator_t
return RCL_RET_BAD_ALLOC;
}

// TODO(y-okumura-isp): log_level and log_*disabled are initialized in rcl_parse_arguments()
// but not in rcl_arguments_copy().
// Check they are only forgotten or there is some reason.
rcl_arguments_impl_t * args_impl = args->impl;
args_impl->num_remap_rules = 0;
args_impl->remap_rules = NULL;
// args_impl->log_level = -1;
args_impl->log_level = -1;
args_impl->external_log_config_file = NULL;
args_impl->unparsed_args = NULL;
args_impl->num_unparsed_args = 0;
Expand All @@ -2084,9 +2077,9 @@ _rcl_allocate_initialized_arguments_impl(rcl_arguments_t * args, rcl_allocator_t
args_impl->parameter_overrides = NULL;
args_impl->parameter_files = NULL;
args_impl->num_param_files_args = 0;
// args_impl->log_stdout_disabled = false;
// args_impl->log_rosout_disabled = false;
// args_impl->log_ext_lib_disabled = false;
args_impl->log_stdout_disabled = false;
args_impl->log_rosout_disabled = false;
args_impl->log_ext_lib_disabled = false;
args_impl->allocator = *allocator;

return RCL_RET_OK;
Expand Down

0 comments on commit 703ec37

Please sign in to comment.