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

Merge pull request !317 from 熊磊/init0216xyt
This commit is contained in:
openharmony_ci 2022-02-16 07:26:15 +00:00 committed by Gitee
commit 2c3c7104cc
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 4 additions and 3 deletions

View File

@ -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;

View File

@ -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++;

View File

@ -69,7 +69,7 @@ typedef struct {
typedef struct {
ParamMessage msg;
uint32_t result;
int32_t result;
} ParamResponseMessage;
typedef LoopBase *ParamTaskPtr;