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

!317 fix: 修复代码静态检查(0216)

Merge pull request !317 from 熊磊/init0216xyt
......@@ -352,8 +352,8 @@ int ServiceStop(Service *service)
static bool CalculateCrashTime(Service *service, int crashTimeLimit, int crashCountLimit)
{
INIT_ERROR_CHECK(service != NULL && crashTimeLimit > 0 && crashCountLimit > 0, return 0,
"Service name=%s, input params error.", service->name);
INIT_ERROR_CHECK(service != NULL && crashTimeLimit > 0 && crashCountLimit > 0,
return false, "input params error.");
time_t curTime = time(NULL);
if (service->crashCnt == 0) {
service->firstCrashTime = curTime;
......
......@@ -63,6 +63,7 @@ int GetParamValue(const char *symValue, unsigned int symLen, char *paramValue, u
curr += begin - start;
}
while (*begin != '{') {
INIT_CHECK_RETURN_VALUE(*begin != '\0', -1);
begin++;
}
begin++;
......
......@@ -69,7 +69,7 @@ typedef struct {
typedef struct {
ParamMessage msg;
uint32_t result;
int32_t result;
} ParamResponseMessage;
typedef LoopBase *ParamTaskPtr;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册