@@ -261,7 +261,7 @@ rcl_parse_arguments(
261261 }
262262 RCUTILS_LOG_DEBUG_NAMED (ROS_PACKAGE_NAME ,
263263 "Couldn't parse arg %d (%s) as parameter file rule. Error: %s" , i , argv [i ],
264- rcl_get_error_string ());
264+ rcl_get_error_string (). str );
265265 rcl_reset_error ();
266266
267267 // Attempt to parse argument as remap rule
@@ -272,7 +272,8 @@ rcl_parse_arguments(
272272 continue ;
273273 }
274274 RCUTILS_LOG_DEBUG_NAMED (ROS_PACKAGE_NAME ,
275- "Couldn't parse arg %d (%s) as remap rule. Error: %s" , i , argv [i ], rcl_get_error_string ());
275+ "Couldn't parse arg %d (%s) as remap rule. Error: %s" , i , argv [i ],
276+ rcl_get_error_string ().str );
276277 rcl_reset_error ();
277278
278279 // Attempt to parse argument as log level configuration
@@ -283,43 +284,54 @@ rcl_parse_arguments(
283284 }
284285 RCUTILS_LOG_DEBUG_NAMED (ROS_PACKAGE_NAME ,
285286 "Couldn't parse arg %d (%s) as log level rule. Error: %s" , i , argv [i ],
286- rcl_get_error_string ());
287+ rcl_get_error_string (). str );
287288 rcl_reset_error ();
288289
289290 // Attempt to parse argument as log configuration file
290- if (RCL_RET_OK == _rcl_parse_external_log_config_file (argv [i ], allocator , & args_impl -> external_log_config_file )) {
291+ rcl_ret_t ret = _rcl_parse_external_log_config_file (argv [i ], allocator ,
292+ & args_impl -> external_log_config_file );
293+ if (RCL_RET_OK == ret ) {
291294 continue ;
292295 }
293296 RCUTILS_LOG_DEBUG_NAMED (ROS_PACKAGE_NAME ,
294297 "Couldn't parse arg %d (%s) as log config rule. Error: %s" , i , argv [i ],
295- rcl_get_error_string ());
298+ rcl_get_error_string (). str );
296299 rcl_reset_error ();
297300
298301 // Attempt to parse argument as log_stdout_disabled
299- if (RCL_RET_OK == _rcl_parse_bool_arg (argv [i ], RCL_LOG_DISABLE_STDOUT_ARG_RULE , & args_impl -> log_stdout_disabled )) {
302+ if (RCL_RET_OK ==
303+ _rcl_parse_bool_arg (argv [i ], RCL_LOG_DISABLE_STDOUT_ARG_RULE ,
304+ & args_impl -> log_stdout_disabled ))
305+ {
300306 continue ;
301307 }
302308 RCUTILS_LOG_DEBUG_NAMED (ROS_PACKAGE_NAME ,
303309 "Couldn't parse arg %d (%s) as log_stdout_disabled rule. Error: %s" , i , argv [i ],
304- rcl_get_error_string ());
310+ rcl_get_error_string (). str );
305311 rcl_reset_error ();
306312
307313 // Attempt to parse argument as log_rosout_disabled
308- if (RCL_RET_OK == _rcl_parse_bool_arg (argv [i ], RCL_LOG_DISABLE_ROSOUT_ARG_RULE , & args_impl -> log_rosout_disabled )) {
314+ if (RCL_RET_OK ==
315+ _rcl_parse_bool_arg (argv [i ], RCL_LOG_DISABLE_ROSOUT_ARG_RULE ,
316+ & args_impl -> log_rosout_disabled ))
317+ {
309318 continue ;
310319 }
311320 RCUTILS_LOG_DEBUG_NAMED (ROS_PACKAGE_NAME ,
312321 "Couldn't parse arg %d (%s) as log_rosout_disabled rule. Error: %s" , i , argv [i ],
313- rcl_get_error_string ());
322+ rcl_get_error_string (). str );
314323 rcl_reset_error ();
315324
316325 // Attempt to parse argument as log_ext_lib_disabled
317- if (RCL_RET_OK == _rcl_parse_bool_arg (argv [i ], RCL_LOG_DISABLE_EXT_LIB_ARG_RULE , & args_impl -> log_ext_lib_disabled )) {
326+ if (RCL_RET_OK ==
327+ _rcl_parse_bool_arg (argv [i ], RCL_LOG_DISABLE_EXT_LIB_ARG_RULE ,
328+ & args_impl -> log_ext_lib_disabled ))
329+ {
318330 continue ;
319331 }
320332 RCUTILS_LOG_DEBUG_NAMED (ROS_PACKAGE_NAME ,
321333 "Couldn't parse arg %d (%s) as log_ext_lib_disabled rule. Error: %s" , i , argv [i ],
322- rcl_get_error_string ());
334+ rcl_get_error_string (). str );
323335 rcl_reset_error ();
324336
325337
@@ -1170,10 +1182,10 @@ _rcl_parse_external_log_config_file(
11701182{
11711183 RCL_CHECK_ARGUMENT_FOR_NULL (arg , RCL_RET_INVALID_ARGUMENT );
11721184
1173- const size_t param_prefix_len = sizeof (RCL_EXTERNAL_LOG_CONFIG_ARG_RULE );
1185+ const size_t param_prefix_len = sizeof (RCL_EXTERNAL_LOG_CONFIG_ARG_RULE ) - 1 ;
11741186 if (strncmp (RCL_EXTERNAL_LOG_CONFIG_ARG_RULE , arg , param_prefix_len ) == 0 ) {
11751187 size_t outlen = strlen (arg ) - param_prefix_len ;
1176- log_config_file = allocator .allocate (sizeof (char ) * (outlen + 1 ), allocator .state );
1188+ * log_config_file = allocator .allocate (sizeof (char ) * (outlen + 1 ), allocator .state );
11771189 if (NULL == log_config_file ) {
11781190 RCUTILS_SAFE_FWRITE_TO_STDERR ("Failed to allocate memory for parameters file path\n" );
11791191 return RCL_RET_BAD_ALLOC ;
@@ -1213,8 +1225,8 @@ _atob(
12131225{
12141226 RCL_CHECK_ARGUMENT_FOR_NULL (str , RCL_RET_INVALID_ARGUMENT );
12151227 RCL_CHECK_ARGUMENT_FOR_NULL (val , RCL_RET_INVALID_ARGUMENT );
1216- const char * true_values [] = {"y" , "Y" , "yes" , "Yes" , "t" , "T" , "true" , "True" , "1" };
1217- const char * false_values [] = {"n" , "N" , "no" , "No" , "f" , "F" , "false" , "False" , "0" };
1228+ const char * true_values [] = {"y" , "Y" , "yes" , "Yes" , "t" , "T" , "true" , "True" , "1" };
1229+ const char * false_values [] = {"n" , "N" , "no" , "No" , "f" , "F" , "false" , "False" , "0" };
12181230
12191231 for (size_t idx = 0 ; idx < sizeof (true_values ) / sizeof (char * ); idx ++ ) {
12201232 if (0 == strncmp (true_values [idx ], str , strlen (true_values [idx ]))) {
0 commit comments