提交 0b830a04 编写于 作者: C chengjinsong

codex

Signed-off-by: Nchengjinsong <chengjinsong2@huawei.com>
上级 e45b365b
...@@ -1006,7 +1006,7 @@ void ParseAllServices(const cJSON *fileRoot) ...@@ -1006,7 +1006,7 @@ void ParseAllServices(const cJSON *fileRoot)
if (service == NULL) { if (service == NULL) {
INIT_LOGE("Failed to add service name %s", fieldStr); INIT_LOGE("Failed to add service name %s", fieldStr);
continue; continue;
} }
} else { } else {
INIT_LOGI("Service %s already exists, updating.", fieldStr); INIT_LOGI("Service %s already exists, updating.", fieldStr);
#ifndef __MUSL__ #ifndef __MUSL__
......
...@@ -128,7 +128,8 @@ static int AddRebootCmdExecutor_(const char *cmd, CmdExecutor executor) ...@@ -128,7 +128,8 @@ static int AddRebootCmdExecutor_(const char *cmd, CmdExecutor executor)
} }
g_rebootParamCmdInfos = cmdInfos; g_rebootParamCmdInfos = cmdInfos;
} }
PLUGIN_CHECK(g_rebootParamCmdValidNumber < g_rebootParamCmdMaxNumber, return -1, "Param cmd number exceed limit"); PLUGIN_CHECK(g_rebootParamCmdValidNumber >= 0 && g_rebootParamCmdValidNumber < g_rebootParamCmdMaxNumber,
return -1, "Param cmd number exceed limit");
return SetParamCmdInfo(&g_rebootParamCmdInfos[g_rebootParamCmdValidNumber], executor, cmd); return SetParamCmdInfo(&g_rebootParamCmdInfos[g_rebootParamCmdValidNumber], executor, cmd);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册