diff --git a/components/fs/kv/tos_kv.c b/components/fs/kv/tos_kv.c index 37f42521..7c6e9392 100644 --- a/components/fs/kv/tos_kv.c +++ b/components/fs/kv/tos_kv.c @@ -1298,11 +1298,11 @@ __API__ int tos_kv_has_key(const char *key) int has_key = K_FALSE; if (!key) { - return KV_ERR_INVALID_PARAM; + return K_FALSE; } if (strlen(key) >= (uint8_t)-1) { - return KV_ERR_SIZE_EXCEEDED; + return K_FALSE; } kv_lock();