[ICD] Fix comment mistakes from post-merge reviews (#33225)
* Fix comment mistakes
* Update src/app/icd/server/ICDManager.h
Co-authored-by: Tennessee Carmel-Veilleux <tennessee.carmelveilleux@gmail.com>
* Update src/app/icd/server/ICDManager.h
Co-authored-by: Tennessee Carmel-Veilleux <tennessee.carmelveilleux@gmail.com>
---------
Co-authored-by: Tennessee Carmel-Veilleux <tennessee.carmelveilleux@gmail.com>
diff --git a/src/app/icd/server/ICDManager.cpp b/src/app/icd/server/ICDManager.cpp
index d2755f7..2b4ccb2 100644
--- a/src/app/icd/server/ICDManager.cpp
+++ b/src/app/icd/server/ICDManager.cpp
@@ -670,7 +670,7 @@
break;
#if CHIP_CONFIG_ENABLE_ICD_CIP
case ICDTestEventTriggerEvent::kInvalidateHalfCounterValues:
- err = ICDConfigurationData::GetInstance().GetICDCounter().InvalidateHalfCheckInCouterValues();
+ err = ICDConfigurationData::GetInstance().GetICDCounter().InvalidateHalfCheckInCounterValues();
break;
case ICDTestEventTriggerEvent::kInvalidateAllCounterValues:
err = ICDConfigurationData::GetInstance().GetICDCounter().InvalidateAllCheckInCounterValues();
diff --git a/src/app/icd/server/ICDManager.h b/src/app/icd/server/ICDManager.h
index bf6e439..ec7d06b 100644
--- a/src/app/icd/server/ICDManager.h
+++ b/src/app/icd/server/ICDManager.h
@@ -74,7 +74,7 @@
};
/**
- * @brief This enum class represents to all ICDStateObserver callbacks available from the
+ * @brief This enum class represents all ICDStateObserver callbacks available from the
* mStateObserverPool for the ICDManager.
*
* EnterActiveMode, TransitionToIdle and EnterIdleMode will always be called as a trio in the same order.
@@ -85,12 +85,12 @@
* When this event is called, the ICD is still in ActiveMode.
* If the ActiveMode timer is increased due to the TransitionToIdle event, the event will not be called a second time in
* a given cycle.
- * OnEnterIdleMode will always the third when the ICD has transitioned to IdleMode.
+ * OnEnterIdleMode will always the third event and indicates that the ICD has transitioned to IdleMode.
*
* The ICDModeChange event can occur independently from the EnterActiveMode, TransitionToIdle and EnterIdleMode.
- * It will typpically hapen at the ICDManager init when a client is already registered with the ICD before the
- * OnEnterIdleMode event or when a client send a register command after the OnEnterActiveMode event. Nothing prevents the
- * ICDModeChange event to happen multiple times per cycle or while the ICD is in IdleMode.
+ * It will typically happen at the ICDManager init when a client is already registered with the ICD before the
+ * OnEnterIdleMode event or when a client sends a register command after the OnEnterActiveMode event. Nothing prevents
+ * the ICDModeChange event from happening multiple times per cycle or while the ICD is in IdleMode.
*
* See src/app/icd/server/ICDStateObserver.h for more information on the APIs each event triggers
*/
diff --git a/src/protocols/secure_channel/CheckInCounter.cpp b/src/protocols/secure_channel/CheckInCounter.cpp
index 5ef576c..d59f7ba 100644
--- a/src/protocols/secure_channel/CheckInCounter.cpp
+++ b/src/protocols/secure_channel/CheckInCounter.cpp
@@ -26,7 +26,7 @@
namespace Protocols {
namespace SecureChannel {
-CHIP_ERROR CheckInCounter::InvalidateHalfCheckInCouterValues()
+CHIP_ERROR CheckInCounter::InvalidateHalfCheckInCounterValues()
{
// Increases the current counter value by half of its maximum range and updates underlying counter storage.
// CheckInCounter is allowed to roll over.
diff --git a/src/protocols/secure_channel/CheckInCounter.h b/src/protocols/secure_channel/CheckInCounter.h
index d22308c..de0e304 100644
--- a/src/protocols/secure_channel/CheckInCounter.h
+++ b/src/protocols/secure_channel/CheckInCounter.h
@@ -53,7 +53,7 @@
*
* @return CHIP_ERROR Any error returned by a write to persisted storage.
*/
- CHIP_ERROR InvalidateHalfCheckInCouterValues();
+ CHIP_ERROR InvalidateHalfCheckInCounterValues();
/**
* @brief Invalidates all the Check-In counter values. After this function is called, the new Check-In counter value will be
diff --git a/src/protocols/secure_channel/tests/TestCheckInCounter.cpp b/src/protocols/secure_channel/tests/TestCheckInCounter.cpp
index 8a64d18..e4a7177 100644
--- a/src/protocols/secure_channel/tests/TestCheckInCounter.cpp
+++ b/src/protocols/secure_channel/tests/TestCheckInCounter.cpp
@@ -37,7 +37,7 @@
* @brief Helper function that validates CheckInCounter value after an operation for configurable input values
*
* @param startValue Starting value of the Check-In counter
- * @param expectedValue Expected value after the InvalidateHalfCheckInCouterValues call
+ * @param expectedValue Expected value after the InvalidateHalfCheckInCounterValues call
*/
void VerifyCheckInCounterValues(uint32_t startValue, uint32_t expectedValue, CheckInCounterOperations operation)
{
@@ -60,7 +60,7 @@
switch (operation)
{
case CheckInCounterOperations::kInvalidateHalf: {
- EXPECT_EQ(counter.InvalidateHalfCheckInCouterValues(), CHIP_NO_ERROR);
+ EXPECT_EQ(counter.InvalidateHalfCheckInCounterValues(), CHIP_NO_ERROR);
break;
}
case CheckInCounterOperations::kInvalidateAll: {