Skip to content

Commit

Permalink
Apply PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jepenven-silabs committed Apr 22, 2022
1 parent 9819db2 commit f9e0a9d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
14 changes: 2 additions & 12 deletions src/inet/InetInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,24 +126,14 @@ bool InterfaceAddressIterator::Next()
if (mNetifAddrList == nullptr)
{
mNetifAddrList = otIp6GetUnicastAddresses(Inet::globalOtInstance);

if (mNetifAddrList == nullptr)
{
return false;
}
mCurAddr = const_cast<otNetifAddress *>(mNetifAddrList);
mCurAddr = mNetifAddrList;
}
else if (mCurAddr != nullptr)
{
mCurAddr = mCurAddr->mNext;
}

if (mCurAddr == nullptr)
{
return false;
}

return true;
return (mCurAddr != nullptr);
}
CHIP_ERROR InterfaceAddressIterator::GetAddress(IPAddress & outIPAddress)
{
Expand Down
2 changes: 1 addition & 1 deletion src/inet/InetInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ class DLL_EXPORT InterfaceAddressIterator
#endif // CHIP_SYSTEM_CONFIG_USE_ZEPHYR_NET_IF
#if CHIP_SYSTEM_CONFIG_USE_OPEN_THREAD_ENDPOINT
const otNetifAddress * mNetifAddrList;
otNetifAddress * mCurAddr;
const otNetifAddress * mCurAddr;
#endif // #if CHIP_SYSTEM_CONFIG_USE_OPEN_THREAD_ENDPOINT
};

Expand Down

0 comments on commit f9e0a9d

Please sign in to comment.