!121 修复resname为NULL导致段错误的问题

Merge pull request !121 from 薛蒙恩/res_printnull
This commit is contained in:
opengauss-bot 2023-04-25 06:44:29 +00:00 committed by Gitee
commit 03a8bbd2d9
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -140,7 +140,7 @@ static status_t SetResBaseInfoInArray(ResBaseInfo *info, const cJSON *resArray,
}
resName = GetValueStrFromCJson(item, RES_NAME);
if (resName == NULL) {
resName = NULL;
resName = PRINT_NULL;
} else {
isCanPrint = CM_TRUE;
}
@ -188,7 +188,7 @@ static void PrintAllResInfoBody(const ResBaseInfo *info, const cJSON *resArray)
}
resName = GetValueStrFromCJson(item, RES_NAME);
if (resName == NULL) {
resName = NULL;
resName = PRINT_NULL;
}
resType = GetValueStrFromCJson(item, RESOURCE_TYPE);
if (resType == NULL) {