diff --git a/kv_store/src/kvstore_common/kvstore_common.c b/kv_store/src/kvstore_common/kvstore_common.c index 5dce515adaf6fcf527fb46638ef45386413d37e3..3244269d81d5c229bc6fe1557387b72154281e07 100755 --- a/kv_store/src/kvstore_common/kvstore_common.c +++ b/kv_store/src/kvstore_common/kvstore_common.c @@ -80,7 +80,7 @@ void DeleteKVCache(const char* key) return; } KvItem* item = g_itemHeader; - while (strncmp(key, item->key, strlen(key)) != 0) { + while (strcmp(key, item->key) != 0) { item = item->next; if (item == NULL) { return; @@ -156,7 +156,7 @@ int GetValueByCache(const char* key, char* value, unsigned int maxLen) return EC_FAILURE; } KvItem* item = g_itemHeader; - while (strncmp(key, item->key, strlen(key)) != 0) { + while (strcmp(key, item->key) != 0) { item = item->next; if (item == NULL) { return EC_FAILURE;