!267 【告警整改】函数行数超过50行

Merge pull request !267 from 刘波/master
This commit is contained in:
openharmony_ci 2024-01-04 03:27:21 +00:00 committed by Gitee
commit 0ca31d4cfd
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -239,13 +239,8 @@ static int ParsePermissions(const char *jsonStr, PermissionSaved **perms, int *p
*perms = NULL;
return PERM_ERRORCODE_JSONPARSE_FAIL;
}
if (strcpy_s((*perms + i)->name, PERM_NAME_LEN, itemName->valuestring) != EOK) {
cJSON_Delete(root);
free(*perms);
*perms = NULL;
return PERM_ERRORCODE_COPY_ERROR;
}
if (strcpy_s((*perms + i)->desc, PERM_DESC_LEN, itemDesc->valuestring) != EOK) {
if (strcpy_s((*perms + i)->name, PERM_NAME_LEN, itemName->valuestring) != EOK
|| strcpy_s((*perms + i)->desc, PERM_DESC_LEN, itemDesc->valuestring) != EOK) {
cJSON_Delete(root);
free(*perms);
*perms = NULL;