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

!1463 修复代码静态告警(1101)挑单

Merge pull request !1463 from cheng_jinsong/cherry-pick-1667354899
......@@ -1006,7 +1006,7 @@ void ParseAllServices(const cJSON *fileRoot)
if (service == NULL) {
INIT_LOGE("Failed to add service name %s", fieldStr);
continue;
}
}
} else {
INIT_LOGI("Service %s already exists, updating.", fieldStr);
#ifndef __MUSL__
......
......@@ -128,7 +128,8 @@ static int AddRebootCmdExecutor_(const char *cmd, CmdExecutor executor)
}
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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册