Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add validation functions accepting string length #135

Merged
merged 1 commit into from
Mar 15, 2018
Merged

Conversation

sloretz
Copy link
Contributor

@sloretz sloretz commented Mar 15, 2018

This PR splits the validation functions to allow passing the length of the string as a parameter. Adding these methods allows ros2/rcl#217 to avoid copying some strings while parsing remap rules.

  • rmw_validate_full_topic_name_with_size()
  • rmw_validate_namespace_with_size()
  • rmw_validate_node_name_with_size()

CI

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

Add rmw_validate_full_topic_name_with_size()
Add rmw_validate_namespace_with_size()
Add rmw_validate_node_name_with_size()
@sloretz sloretz added the in review Waiting for review (Kanban column) label Mar 15, 2018
Copy link
Member

@wjwwood wjwwood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

I would have also been ok just changing the existing functions to always require the user to call strlen, but I wasn't clear about that and this is great too.

@sloretz sloretz merged commit 82700b6 into master Mar 15, 2018
@sloretz sloretz deleted the validate_with_size branch March 15, 2018 21:05
@sloretz sloretz removed the in review Waiting for review (Kanban column) label Mar 15, 2018
dabonnie pushed a commit to aws-ros-dev/rmw that referenced this pull request Apr 2, 2019
Add rmw_validate_full_topic_name_with_size()
Add rmw_validate_namespace_with_size()
Add rmw_validate_node_name_with_size()

Signed-off-by: Devin Bonnie <dbbonnie@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants