Skip to content

Commit

Permalink
Address reviewer feedback
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Carroll <michael@openrobotics.org>
  • Loading branch information
mjcarroll committed Apr 21, 2020
1 parent 5002677 commit 1edfd4c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions rcl/include/rcl/subscription.h
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ rcl_subscription_get_default_options(void);
* \param[inout] ros_message type-erased ptr to a allocated ROS message
* \param[out] message_info rmw struct which contains meta-data for the message
* \param[in] allocation structure pointer used for memory preallocation (may be NULL)
* \return `RCL_RET_OK` if the message was published, or
* \return `RCL_RET_OK` if the message was taken, or
* \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or
* \return `RCL_RET_SUBSCRIPTION_INVALID` if the subscription is invalid, or
* \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or
Expand All @@ -272,7 +272,7 @@ rcl_take(
/**
* In contrast to `rcl_take`, this function can take multiple messages at
* the same time.
* It is the job of the caller to enusre that the type of the message_sequence
* It is the job of the caller to ensure that the type of the message_sequence
* argument and the type associated with the subscription, via the type
* support, match.
*
Expand All @@ -299,9 +299,9 @@ rcl_take(
* \param[in] subscription the handle to the subscription from which to take.
* \param[in] count number of messages to attempt to take.
* \param[inout] message_sequence pointer to a (pre-allocated) message sequence.
* \param[inout] message_info_sequence pointer to a (pre-allocated) message info sequence .
* \param[inout] message_info_sequence pointer to a (pre-allocated) message info sequence.
* \param[in] allocation structure pointer used for memory preallocation (may be NULL)
* \return `RCL_RET_OK` if the message was published, or
* \return `RCL_RET_OK` if one or more messages was taken, or
* \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or
* \return `RCL_RET_SUBSCRIPTION_INVALID` if the subscription is invalid, or
* \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or
Expand Down
2 changes: 1 addition & 1 deletion rcl/src/rcl/subscription.c
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ rcl_take_sequence(
}
RCUTILS_LOG_DEBUG_NAMED(
ROS_PACKAGE_NAME, "Subscription took %zu messages", taken);
if (taken == 0) {
if (0u == taken) {
return RCL_RET_SUBSCRIPTION_TAKE_FAILED;
}
return RCL_RET_OK;
Expand Down

0 comments on commit 1edfd4c

Please sign in to comment.