Skip to content

Commit 1b8a7a6

Browse files
Improve naming to avoid double negatives.
1 parent 0dd5235 commit 1b8a7a6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/darwin/Framework/CHIP/MTRDevice.mm

+3-3
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,9 @@ typedef NS_ENUM(NSUInteger, MTRInternalDeviceState) {
143143
// Utility methods for working with MTRInternalDeviceState, located near the
144144
// enum so it's easier to notice that they need to stay in sync.
145145
namespace {
146-
bool NoInitialSubscriptionYet(MTRInternalDeviceState state)
146+
bool HadSubscriptionEstablishedOnce(MTRInternalDeviceState state)
147147
{
148-
return state < MTRInternalDeviceStateInitalSubscriptionEstablished;
148+
return state >= MTRInternalDeviceStateInitalSubscriptionEstablished;
149149
}
150150

151151
bool NeedToStartSubscriptionSetup(MTRInternalDeviceState state)
@@ -815,7 +815,7 @@ - (void)_markDeviceAsUnreachableIfNeverSubscribed
815815
{
816816
os_unfair_lock_assert_owner(&self->_lock);
817817

818-
if (!NoInitialSubscriptionYet(_internalDeviceState)) {
818+
if (HadSubscriptionEstablishedOnce(_internalDeviceState)) {
819819
return;
820820
}
821821

0 commit comments

Comments
 (0)