Fix cpplint on xenial (#556)

* Change variable name to fix cpplint on xenial

* Set variable to null to satisfy cpplint

* additional null
This commit is contained in:
Shane Loretz 2018-09-20 09:19:45 -07:00 committed by GitHub
parent be8c05ed9e
commit e8d3fdd56c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -130,6 +130,7 @@ Clock::create_jump_callback(
rclcpp::Clock::on_time_jump, handler); rclcpp::Clock::on_time_jump, handler);
if (RCL_RET_OK != ret) { if (RCL_RET_OK != ret) {
delete handler; delete handler;
handler = NULL;
rclcpp::exceptions::throw_from_rcl_error(ret, "Failed to add time jump callback"); rclcpp::exceptions::throw_from_rcl_error(ret, "Failed to add time jump callback");
} }
@ -139,6 +140,7 @@ Clock::create_jump_callback(
rcl_ret_t ret = rcl_clock_remove_jump_callback(&rcl_clock_, rclcpp::Clock::on_time_jump, rcl_ret_t ret = rcl_clock_remove_jump_callback(&rcl_clock_, rclcpp::Clock::on_time_jump,
handler); handler);
delete handler; delete handler;
handler = NULL;
if (RCL_RET_OK != ret) { if (RCL_RET_OK != ret) {
RCUTILS_LOG_ERROR("Failed to remove time jump callback"); RCUTILS_LOG_ERROR("Failed to remove time jump callback");
} }