diff --git a/src/platform/Ameba/KeyValueStoreManagerImpl.cpp b/src/platform/Ameba/KeyValueStoreManagerImpl.cpp index 897f42c167202f..1fede31febb7c1 100644 --- a/src/platform/Ameba/KeyValueStoreManagerImpl.cpp +++ b/src/platform/Ameba/KeyValueStoreManagerImpl.cpp @@ -94,7 +94,7 @@ CHIP_ERROR KeyValueStoreManagerImpl::_Put(const char * key, const void * value, if (checkExist(key, key)) { ret = deleteKey(key, key); - if (TRUE != ret) + if (ret != 0) { ChipLogError(DeviceLayer, "Warning, KVS leakage, failed to remove old kvs value"); }