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

reiterate over char array #130

Merged
merged 2 commits into from
Nov 27, 2018
Merged

reiterate over char array #130

merged 2 commits into from
Nov 27, 2018

Conversation

Karsten1987
Copy link
Contributor

This is a follow up PR to incorporate feedback in #125 for the uint8_array as the same remarks apply.

CI:

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

@Karsten1987 Karsten1987 added the in review Waiting for review (Kanban column) label Nov 25, 2018
@Karsten1987 Karsten1987 self-assigned this Nov 25, 2018
Copy link
Member

@dirk-thomas dirk-thomas left a comment

Choose a reason for hiding this comment

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

Beside one nitpick lgtm.

I am just surprised that lu is needed in all these places. Especially for zero values.

src/char_array.c Outdated
if (!rcutils_allocator_is_valid(allocator)) {
RCUTILS_SET_ERROR_MSG("char array has no valid allocator");
return RCUTILS_RET_ERROR;
if (new_size == 0lu) {
Copy link
Member

Choose a reason for hiding this comment

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

Nitpick: swap the sides of the operator: 0lu == new_size.

@Karsten1987 Karsten1987 merged commit 670a3e3 into master Nov 27, 2018
@Karsten1987 Karsten1987 deleted the iterate_char_array branch November 27, 2018 20:17
@Karsten1987 Karsten1987 removed the in review Waiting for review (Kanban column) label Nov 27, 2018
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.

2 participants