提交 c90e31d9 编写于 作者: D daishengdong

fix return code of tos_kv_has_key when sanity check failed

上级 a561a713
......@@ -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();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册