提交 b0a34e1d 编写于 作者: M Mupceet

codex

Signed-off-by: NMupceet <laiguizhong@huawei.com>
上级 9b98fd1f
......@@ -321,6 +321,8 @@ static int GetUid(cJSON *json, uid_t *uid)
*uid = DecodeUid(str);
} else if (cJSON_IsNumber(json)) {
*uid = (uid_t)cJSON_GetNumberValue(json);
} else {
*uid = (uid_t)(-1);
}
INIT_CHECK_RETURN_VALUE(*uid != (uid_t)(-1), SERVICE_FAILURE);
return SERVICE_SUCCESS;
......@@ -967,12 +969,12 @@ void ParseAllServices(const cJSON *fileRoot)
cJSON *curItem = cJSON_GetArrayItem(serviceArr, i);
int ret = GetStringItem(curItem, "name", serviceName, MAX_SERVICE_NAME);
if (ret != 0) {
INIT_LOGE("Failed to get service name %s", serviceName);
INIT_LOGE("Failed to get service name");
continue;
}
Service *service = GetServiceByName(serviceName);
if (service != NULL) {
INIT_LOGE("Service name %s has been exist", serviceName);
INIT_LOGE("Service \' %s \' already exist", serviceName);
continue;
}
service = AddService(serviceName);
......
......@@ -222,8 +222,8 @@ static void HandlerFdHolder(int sock)
} else {
INIT_LOGE("Unexpected action: %s", action);
}
FreeFds(fds);
CloseFds(fds, fdCount);
FreeFds(fds);
FreeStringVector(msg, msgCount);
}
......
......@@ -278,7 +278,7 @@ int ConvertInfixToPrefix(const char *condition, char *prefix, uint32_t prefixLen
uint32_t prefixIndex = 0;
size_t conditionLen = strlen(condition);
LogicCalculator calculator;
CalculatorInit(&calculator, MAX_CALC_PARAM, 1, 0);
PARAM_CHECK(CalculatorInit(&calculator, MAX_CALC_PARAM, 1, 0) == 0, return -1, "Failed to init calculator");
while (curr < conditionLen) {
if (condition[curr] == ')') {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册