Skip to content

Commit 90707d3

Browse files
[nrf toup][Zephyr] Fixed error conditions in KVS Manager Impl
Error conditions use the opposite logic than intended and because of that KVS delete operations fail. Signed-off-by: Kamil Kasperczyk <kamil.kasperczyk@nordicsemi.no>
1 parent 2f5005c commit 90707d3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/platform/Zephyr/KeyValueStoreManagerImpl.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,8 @@ CHIP_ERROR KeyValueStoreManagerImpl::_Delete(const char * key)
233233

234234
ReturnErrorOnFailure(MakeFullKey(fullKey, key));
235235

236-
VerifyOrReturnError(!settings_get_val_len(fullKey), CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND);
237-
VerifyOrReturnError(settings_delete(fullKey) != 0, CHIP_ERROR_PERSISTED_STORAGE_FAILED);
236+
VerifyOrReturnError(settings_get_val_len(fullKey), CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND);
237+
VerifyOrReturnError(settings_delete(fullKey) == 0, CHIP_ERROR_PERSISTED_STORAGE_FAILED);
238238

239239
return CHIP_NO_ERROR;
240240
}

0 commit comments

Comments
 (0)