Skip to content

Commit

Permalink
Restyled by clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
restyled-commits authored and joonhaengHeo committed May 24, 2024
1 parent 2d18387 commit 73b24dc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
11 changes: 6 additions & 5 deletions src/controller/AbstractDnssdDiscoveryController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,19 @@
namespace chip {
namespace Controller {

bool compareIpAddresses(const size_t sourceNumIPs, const size_t destinationNumIPs, const Inet::IPAddress *source, const Inet::IPAddress *destination)
bool compareIpAddresses(const size_t sourceNumIPs, const size_t destinationNumIPs, const Inet::IPAddress * source,
const Inet::IPAddress * destination)
{
size_t sameIpAddress = 0;
bool addressUsed[chip::Dnssd::CommonResolutionData::kMaxIPAddresses] = {false};
size_t sameIpAddress = 0;
bool addressUsed[chip::Dnssd::CommonResolutionData::kMaxIPAddresses] = { false };
if (sourceNumIPs != destinationNumIPs)
{
return false;
}

for (size_t s = 0 ; s < sourceNumIPs ; s++)
for (size_t s = 0; s < sourceNumIPs; s++)
{
for (size_t d = 0 ; d < destinationNumIPs ; d++)
for (size_t d = 0; d < destinationNumIPs; d++)
{
if (!addressUsed[d] && source[s] == destination[d])
{
Expand Down
1 change: 0 additions & 1 deletion src/controller/tests/TestCommissionableNodeController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,6 @@ TEST_F(TestCommissionableNodeController, TestGetDiscoveredCommissioner_MultipleI

controller.OnNodeDiscovered(discNodeData4);


// Example 2 result - example 1 is removed. (reason : duplicate)
ASSERT_NE(controller.GetDiscoveredCommissioner(0), nullptr);
EXPECT_STREQ(inNodeData1.hostName, controller.GetDiscoveredCommissioner(0)->hostName);
Expand Down

0 comments on commit 73b24dc

Please sign in to comment.