Skip to content

Commit

Permalink
Remove no-longer-needed checks for CHIP_ERROR_KEY_NOT_FOUND. (#15841)
Browse files Browse the repository at this point in the history
Our storage now guarantees it will return
CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND when there is nothing stored under the key.
  • Loading branch information
bzbarsky-apple authored and pull[bot] committed Oct 17, 2023
1 parent 2a82c1e commit 3946256
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/transport/GroupPeerMessageCounter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ CHIP_ERROR GroupOutgoingCounters::Init(chip::PersistentStorageDelegate * storage
uint32_t temp;
CHIP_ERROR err;
err = mStorage->SyncGetKeyValue(key.GroupControlCounter(), &temp, size);
if (err == CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND || err == CHIP_ERROR_KEY_NOT_FOUND)
if (err == CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND)
{
// might be the first time we retrieve the value
// TODO handle this case
Expand All @@ -259,7 +259,7 @@ CHIP_ERROR GroupOutgoingCounters::Init(chip::PersistentStorageDelegate * storage
}

err = mStorage->SyncGetKeyValue(key.GroupDataCounter(), &temp, size);
if (err == CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND || err == CHIP_ERROR_KEY_NOT_FOUND)
if (err == CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND)
{
// might be the first time we retrieve the value
// TODO handle this case
Expand Down

0 comments on commit 3946256

Please sign in to comment.