-
Notifications
You must be signed in to change notification settings - Fork 178
Description
Hi,
In the file timer, there are several null checks for the argument timer
RCL_CHECK_ARGUMENT_FOR_NULL(timer, RCL_RET_INVALID_ARGUMENT);
But, as I understand this check not really a good validation since in here it's only verify whether the pointer for timer argument is null but not it's field struct rcl_timer_impl_t * impl;
In my implementation, using this library, I had issues sending null timer to rcl_timer_exchange_period
and didn't understand exactly why, so I added locally another check for all those functions that are using the timer argument
RCL_CHECK_FOR_NULL_WITH_MSG(timer->impl, "timer is invalid", return RCL_RET_INVALID_ARGUMENT);
and that caught those time I sent null timer.
I think it is a fix that can help others that might have the same problems as I do.
Thanks.