From a1cae4a550dedf173978fdfb846a7519dcdd2f82 Mon Sep 17 00:00:00 2001 From: Dirk Thomas Date: Mon, 27 Aug 2018 09:19:10 -0700 Subject: [PATCH] swap comparison sides --- rcl/src/rcl/wait.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rcl/src/rcl/wait.c b/rcl/src/rcl/wait.c index 1795d575f..2fcd2bbda 100644 --- a/rcl/src/rcl/wait.c +++ b/rcl/src/rcl/wait.c @@ -82,7 +82,7 @@ __wait_set_clean_up(rcl_wait_set_t * wait_set, rcl_allocator_t allocator) if (wait_set->subscriptions) { rcl_ret_t ret = rcl_wait_set_resize(wait_set, 0, 0, 0, 0, 0); (void)ret; // NO LINT - assert(ret == RCL_RET_OK); // Defensive, shouldn't fail with size 0. + assert(RCL_RET_OK == ret); // Defensive, shouldn't fail with size 0. } if (wait_set->impl) { allocator.deallocate(wait_set->impl, allocator.state); @@ -575,7 +575,7 @@ rcl_wait(rcl_wait_set_t * wait_set, int64_t timeout) } } - if (ret == RMW_RET_TIMEOUT && !is_timer_timeout) { + if (RMW_RET_TIMEOUT == ret && !is_timer_timeout) { return RCL_RET_TIMEOUT; } return RCL_RET_OK;