@@ -56,26 +56,26 @@ rmw_names_and_types_init(
5656 rcutils_allocator_t * allocator )
5757{
5858 if (!allocator ) {
59- RMW_SET_ERROR_MSG ("allocator is null" )
59+ RMW_SET_ERROR_MSG ("allocator is null" );
6060 return RMW_RET_INVALID_ARGUMENT ;
6161 }
6262 if (!names_and_types ) {
63- RMW_SET_ERROR_MSG_ALLOC ("names_and_types is null" , * allocator )
63+ RMW_SET_ERROR_MSG ("names_and_types is null" );
6464 return RMW_RET_INVALID_ARGUMENT ;
6565 }
6666 rcutils_ret_t rcutils_ret = rcutils_string_array_init (& names_and_types -> names , size , allocator );
6767 if (rcutils_ret != RCUTILS_RET_OK ) {
68- RMW_SET_ERROR_MSG (rcutils_get_error_string_safe ())
68+ RMW_SET_ERROR_MSG (rcutils_get_error_string (). str );
6969 return rmw_convert_rcutils_ret_to_rmw_ret (rcutils_ret );
7070 }
7171 names_and_types -> types =
7272 allocator -> zero_allocate (size , sizeof (rcutils_string_array_t ), allocator -> state );
7373 if (!names_and_types -> types ) {
7474 rcutils_ret = rcutils_string_array_fini (& names_and_types -> names );
7575 if (rcutils_ret != RCUTILS_RET_OK ) {
76- RCUTILS_LOG_ERROR ("error while reporting error: %s" , rcutils_get_error_string_safe () );
76+ RCUTILS_LOG_ERROR ("error while reporting error: %s" , rcutils_get_error_string (). str );
7777 }
78- RMW_SET_ERROR_MSG_ALLOC ("failed to allocate memory for types" , * allocator )
78+ RMW_SET_ERROR_MSG ("failed to allocate memory for types" );
7979 return RMW_RET_BAD_ALLOC ;
8080 }
8181 return RMW_RET_OK ;
@@ -89,7 +89,7 @@ rmw_names_and_types_fini(rmw_names_and_types_t * names_and_types)
8989 return RMW_RET_INVALID_ARGUMENT ;
9090 }
9191 if (names_and_types -> names .size && !names_and_types -> types ) {
92- RMW_SET_ERROR_MSG ("invalid names_and_types" )
92+ RMW_SET_ERROR_MSG ("invalid names_and_types" );
9393 return RMW_RET_INVALID_ARGUMENT ;
9494 }
9595 rcutils_ret_t rcutils_ret ;
@@ -101,7 +101,7 @@ rmw_names_and_types_fini(rmw_names_and_types_t * names_and_types)
101101 }
102102 rcutils_ret = rcutils_string_array_fini (& names_and_types -> types [i ]);
103103 if (rcutils_ret != RCUTILS_RET_OK ) {
104- RMW_SET_ERROR_MSG (rcutils_get_error_string_safe ())
104+ RMW_SET_ERROR_MSG (rcutils_get_error_string (). str );
105105 return rmw_convert_rcutils_ret_to_rmw_ret (rcutils_ret );
106106 }
107107 }
@@ -115,7 +115,7 @@ rmw_names_and_types_fini(rmw_names_and_types_t * names_and_types)
115115 // Cleanup names string array
116116 rcutils_ret = rcutils_string_array_fini (& names_and_types -> names );
117117 if (rcutils_ret != RCUTILS_RET_OK ) {
118- RMW_SET_ERROR_MSG (rcutils_get_error_string_safe ())
118+ RMW_SET_ERROR_MSG (rcutils_get_error_string (). str );
119119 return rmw_convert_rcutils_ret_to_rmw_ret (rcutils_ret );
120120 }
121121 return RMW_RET_OK ;
0 commit comments