未验证 提交 4b157f46 编写于 作者: O openharmony_ci 提交者: Gitee

!1735 fix bug for CachedParameterCreate

Merge pull request !1735 from cheng_jinsong/fixCachedParameterCreateError
......@@ -369,6 +369,7 @@ static int ReadParamValue(ParamHandle handle, char *value, uint32_t *length)
CachedHandle CachedParameterCreate(const char *name, const char *defValue)
{
PARAM_CHECK(name != NULL && defValue != NULL, return NULL, "Invalid name or default value");
PARAM_CHECK(GetParamWorkSpace() != NULL, return NULL, "Invalid workspace");
PARAM_WORKSPACE_CHECK(GetParamWorkSpace(), return NULL, "Invalid param workspace");
uint32_t nameLen = strlen(name);
PARAM_CHECK(nameLen < PARAM_NAME_LEN_MAX, return NULL, "Invalid name %s", name);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册