Skip to content

Commit

Permalink
Change code style
Browse files Browse the repository at this point in the history
Signed-off-by: Barry Xu <barry.xu@sony.com>
  • Loading branch information
Barry-Xu-2018 committed Oct 13, 2020
1 parent e5823e8 commit 0951701
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
7 changes: 3 additions & 4 deletions rcl/src/rcl/publisher.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,9 @@ rcl_publisher_init(
fail:
if (publisher->impl) {
if (publisher->impl->rmw_handle) {
if (rmw_destroy_publisher(
rcl_node_get_rmw_handle(node),
publisher->impl->rmw_handle) != RMW_RET_OK)
{
rmw_ret_t rmw_fail_ret = rmw_destroy_publisher(
rcl_node_get_rmw_handle(node), publisher->impl->rmw_handle);
if (RMW_RET_OK != rmw_fail_ret) {
RCL_SET_ERROR_MSG(rmw_get_error_string().str);
}
}
Expand Down
7 changes: 3 additions & 4 deletions rcl/src/rcl/subscription.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,9 @@ rcl_subscription_init(
fail:
if (subscription->impl) {
if (subscription->impl->rmw_handle) {
if (rmw_destroy_subscription(
rcl_node_get_rmw_handle(node),
subscription->impl->rmw_handle) != RMW_RET_OK)
{
rmw_ret_t rmw_fail_ret = rmw_destroy_subscription(
rcl_node_get_rmw_handle(node), subscription->impl->rmw_handle);
if (RMW_RET_OK != rmw_fail_ret) {
RCL_SET_ERROR_MSG(rmw_get_error_string().str);
}
}
Expand Down

0 comments on commit 0951701

Please sign in to comment.