From 1e6c5d076ab35202fcb3a7fd8acfef0ca01702d9 Mon Sep 17 00:00:00 2001 From: Philip Gregor Date: Fri, 19 Apr 2024 14:00:11 -0700 Subject: [PATCH] Fix failing Linux CI check for CommissionerPasscode in TestTxtFields.cpp --- src/lib/dnssd/Types.h | 2 +- src/lib/dnssd/tests/TestTxtFields.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/dnssd/Types.h b/src/lib/dnssd/Types.h index 005dee67f9b72f..0f38683f39c53f 100644 --- a/src/lib/dnssd/Types.h +++ b/src/lib/dnssd/Types.h @@ -214,7 +214,7 @@ struct DnssdNodeData uint16_t productId = 0; uint16_t pairingHint = 0; uint8_t commissioningMode = 0; - bool commissionerPasscode = 0; + bool commissionerPasscode = false; uint8_t rotatingId[kMaxRotatingIdLen] = {}; char instanceName[Commission::kInstanceNameMaxLength + 1] = {}; char deviceName[kMaxDeviceNameLen + 1] = {}; diff --git a/src/lib/dnssd/tests/TestTxtFields.cpp b/src/lib/dnssd/tests/TestTxtFields.cpp index 4593a4903b1a01..d8b91db28e967e 100644 --- a/src/lib/dnssd/tests/TestTxtFields.cpp +++ b/src/lib/dnssd/tests/TestTxtFields.cpp @@ -360,12 +360,12 @@ void TestFillDiscoveredNodeDataFromTxt(nlTestSuite * inSuite, void * inContext) filled.nodeData.commissioningMode = 0; NL_TEST_ASSERT(inSuite, NodeDataIsEmpty(filled)); - // Commissioning mode + // CommissionerPasscode strcpy(key, "CP"); strcpy(val, "1"); FillNodeDataFromTxt(GetSpan(key), GetSpan(val), filled.nodeData); - NL_TEST_ASSERT(inSuite, filled.nodeData.commissionerPasscode == 1); - filled.nodeData.commissionerPasscode = 0; + NL_TEST_ASSERT(inSuite, filled.nodeData.commissionerPasscode == true); + filled.nodeData.commissionerPasscode = false; NL_TEST_ASSERT(inSuite, NodeDataIsEmpty(filled)); // Device type