diff --git a/rmw_zenoh_cpp/src/detail/rmw_client_data.cpp b/rmw_zenoh_cpp/src/detail/rmw_client_data.cpp index bba7ab33..6e1468d7 100644 --- a/rmw_zenoh_cpp/src/detail/rmw_client_data.cpp +++ b/rmw_zenoh_cpp/src/detail/rmw_client_data.cpp @@ -245,11 +245,11 @@ bool ClientData::init(const z_loaned_session_t * session) [this]() { z_drop(z_move(this->token_)); }); - if(zc_liveliness_declare_token( - session, - &this->token_, - z_loan(liveliness_ke), - NULL + if (zc_liveliness_declare_token( + session, + &this->token_, + z_loan(liveliness_ke), + NULL ) != Z_OK) { RMW_ZENOH_LOG_ERROR_NAMED( diff --git a/rmw_zenoh_cpp/src/detail/rmw_context_impl_s.cpp b/rmw_zenoh_cpp/src/detail/rmw_context_impl_s.cpp index d56aee22..3cbc460f 100644 --- a/rmw_zenoh_cpp/src/detail/rmw_context_impl_s.cpp +++ b/rmw_zenoh_cpp/src/detail/rmw_context_impl_s.cpp @@ -179,9 +179,9 @@ class rmw_context_impl_s::Data final // Initialize the shm manager if shared_memory is enabled in the config. shm_provider_ = std::nullopt; if (strncmp( - z_string_data(z_loan(shm_enabled)), - "true", - z_string_len(z_loan(shm_enabled))) == 0) + z_string_data(z_loan(shm_enabled)), + "true", + z_string_len(z_loan(shm_enabled))) == 0) { // TODO(yuyuan): determine the default alignment of SHM z_alloc_alignment_t alignment = {5};