Skip to content

Commit

Permalink
Apply code review comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Damian-Nordic committed Dec 10, 2020
1 parent aad5122 commit bde1051
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/controller/CHIPDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -268,9 +268,10 @@ CHIP_ERROR Device::LoadSecureSessionParameters(ResetTransport resetNeeded)

bool Device::GetIpAddress(Inet::IPAddress & addr) const
{
if (mState != ConnectionState::NotConnected)
addr = mDeviceAddr;
return mState != ConnectionState::NotConnected;
if (mState == ConnectionState::NotConnected)
return false;
addr = mDeviceAddr;
return true;
}

void Device::AddResponseHandler(EndpointId endpoint, ClusterId cluster, Callback::Callback<> * onResponse)
Expand Down

0 comments on commit bde1051

Please sign in to comment.