diff --git a/rmw/include/rmw/message_sequence.h b/rmw/include/rmw/message_sequence.h index cc032e82..35e857ae 100644 --- a/rmw/include/rmw/message_sequence.h +++ b/rmw/include/rmw/message_sequence.h @@ -52,7 +52,7 @@ typedef struct RMW_PUBLIC_TYPE rmw_message_info_sequence_t rcutils_allocator_t * allocator; } rmw_message_info_sequence_t; -/// Return an rmw_message_sequence_t struct with members initialized to `NULL`; +/// Return an rmw_message_sequence_t struct with members initialized to `NULL` RMW_PUBLIC rmw_message_sequence_t rmw_get_zero_initialized_message_sequence(void); @@ -74,7 +74,7 @@ rmw_message_sequence_init( /** * The rmw_message_sequence_t struct has members which require memory to be allocated to them * before setting values. - * This function reclaims any allocated resources within the obect and zeroes out all other + * This function reclaims any allocated resources within the object and zeroes out all other * members. * * Note: This will not call `fini` or deallocate the underlying message structures. diff --git a/rmw/include/rmw/rmw.h b/rmw/include/rmw/rmw.h index ab108aba..9e1c9fb1 100644 --- a/rmw/include/rmw/rmw.h +++ b/rmw/include/rmw/rmw.h @@ -723,8 +723,8 @@ rmw_take_with_info( * * While `count` messages may be requested, fewer messages may be available on the subscription. * In this case, only the currently available messages will be returned. - * The `taken` flag indicate the number of messages actually taken. - * The method will return `RMW_RET_OK` even in the case that fewer (or zero) messages retrieved + * The `taken` flag indicates the number of messages actually taken. + * The method will return `RMW_RET_OK` even in the case that fewer (or zero) messages were retrieved. * from the subscription, and will `RMW_RET_ERROR` in the case of unexpected errors. * In the case that `count` is zero, the function will return `RMW_RET_INVALID_ARGUMENT`. * @@ -734,14 +734,14 @@ rmw_take_with_info( * * \param[in] subscription The subscription object to take from. * \param[in] count Number of messages to attempt to take. - * \param[out] message_sequence The sequence ROS message data on success. + * \param[out] message_sequence The sequence of ROS message data on success. * \param[out] message_info_sequence The sequence of additional message metadata on success. * \param[out] taken Number of messages actually taken from subscription. * \param[in] allocation Preallocated buffer to use (may be NULL). * \return `RMW_RET_OK` if successful, or * \return `RMW_RET_INVALID_ARGUMENT` if an argument is invalid, or * \return `RMW_RET_BAD_ALLOC` if memory allocation failed, or - * \return `RMW_RET_INCORRECT_RMW_IMPLEMENTATION` if the subscription is invalid, or + * \return `RMW_RET_INCORRECT_RMW_IMPLEMENTATION` if the rmw implementation does not match, or * \return `RMW_RET_ERROR` if an unexpected error occurs. */ RMW_PUBLIC diff --git a/rmw/src/message_sequence.c b/rmw/src/message_sequence.c index 6045d8d1..0ba3ca67 100644 --- a/rmw/src/message_sequence.c +++ b/rmw/src/message_sequence.c @@ -21,7 +21,8 @@ rmw_get_zero_initialized_message_sequence(void) static rmw_message_sequence_t message_sequence = { .data = NULL, .size = 0u, - .capacity = 0u + .capacity = 0u, + .allocator = NULL }; return message_sequence;