Skip to content

Commit

Permalink
compare string contents but string pointer addresses. (#744)
Browse files Browse the repository at this point in the history
Signed-off-by: Tomoya Fujita <[email protected]>
  • Loading branch information
fujitatomoya authored Feb 29, 2024
1 parent 1301b8d commit c48406a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions rmw_fastrtps_dynamic_cpp/src/type_support_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,15 @@
bool
using_introspection_c_typesupport(const char * typesupport_identifier)
{
return typesupport_identifier == rosidl_typesupport_introspection_c__identifier;
return strcmp(
typesupport_identifier,
rosidl_typesupport_introspection_c__identifier) == 0;
}

bool
using_introspection_cpp_typesupport(const char * typesupport_identifier)
{
return typesupport_identifier ==
rosidl_typesupport_introspection_cpp::typesupport_identifier;
return strcmp(
typesupport_identifier,
rosidl_typesupport_introspection_cpp::typesupport_identifier) == 0;
}

0 comments on commit c48406a

Please sign in to comment.