Skip to content

Commit

Permalink
Fix small error on merge
Browse files Browse the repository at this point in the history
  • Loading branch information
cecille committed Jun 29, 2021
1 parent 82a88b9 commit 2296d73
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/mdns/tests/TestServiceNaming.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,9 @@ void TestMakeServiceTypeName(nlTestSuite * inSuite, void * inContext)
NL_TEST_ASSERT(inSuite, MakeServiceTypeName(buffer, sizeof(buffer), filter, DiscoveryType::kCommissionerNode) == CHIP_NO_ERROR);
NL_TEST_ASSERT(inSuite, strcmp(buffer, "_matterd") == 0);

// Test buffer exactly the right size - "_matterc" = 8 + nullchar = 9
// Test buffer just under the right size - "_matterc" = 8 + nullchar = 9
filter.type = DiscoveryFilterType::kNone;
NL_TEST_ASSERT(inSuite, MakeServiceTypeName(buffer, 9, filter, DiscoveryType::kCommissionableNode) == CHIP_ERROR_NO_MEMORY);
NL_TEST_ASSERT(inSuite, MakeServiceTypeName(buffer, 8, filter, DiscoveryType::kCommissionableNode) == CHIP_ERROR_NO_MEMORY);

// Test buffer exactly the right size - "_matterc" = 8 + nullchar = 9
filter.type = DiscoveryFilterType::kNone;
Expand Down

0 comments on commit 2296d73

Please sign in to comment.