#issue:IBBHM1 告警优化:超大函数调整

Signed-off-by: xuezhou_yan <yangang20@huawei.com>
This commit is contained in:
xuezhou_yan
2024-12-16 11:44:53 +08:00
parent 2e1552a5a7
commit a127273c20
+2 -4
View File
@@ -480,7 +480,7 @@ int32_t DecodePCID(char *inputFile, char *outDirPath)
freePcidJsonInfo.jsonRootObj = NULL;
freePcidJsonInfo.sysCapObj = NULL;
freePcidJsonInfo.flag = 0;
ret = CheckFileAndGetFileContext(inputFile, &freePcidJsonInfo.contextBuffer, (uint32_t *)&contextBufLen);
if (ret != 0) {
return -1;
@@ -495,8 +495,7 @@ int32_t DecodePCID(char *inputFile, char *outDirPath)
}
/* system type */
char *systemType = pcidMain->systemType == 0b001 ? "mini" :
(pcidMain->systemType == 0b010 ? "small" :
char *systemType = pcidMain->systemType == 0b001 ? "mini" :(pcidMain->systemType == 0b010 ? "small" :
(pcidMain->systemType == 0b100 ? "standard" : NULL));
if (systemType == NULL) {
PRINT_ERR("prase file failed, systemType is invaild, %u\n", pcidMain->systemType);
@@ -524,7 +523,6 @@ int32_t DecodePCID(char *inputFile, char *outDirPath)
freePcidJsonInfo.strJson = cJSON_Print(freePcidJsonInfo.jsonRootObj);
if (freePcidJsonInfo.strJson == NULL) {
PRINT_ERR("cJSON_Print failed\n");
return FreeAfterDecodePCID(freePcidJsonInfo, FREE_DECODE_PCID_ROOT_OUT, -1);
}