提交 2c206840 编写于 作者: X xionglei6@huawei.com

fix code style

Signed-off-by: Nxionglei6@huawei.com <xionglei6@huawei.com>
上级 78810b80
......@@ -111,7 +111,7 @@ static int LoadParamLabels(const char *fileName, SecurityLabelFunc label, void *
FILE *fpForGroup = fopen(GROUP_FILE_PATH, "r");
FILE *fpForUser = fopen(USER_FILE_PATH, "r");
FILE *fp = fopen(fileName, "r");
SubStringInfo *info = malloc(sizeof(SubStringInfo) * SUBSTR_INFO_DAC + 1);
SubStringInfo *info = malloc(sizeof(SubStringInfo) * (SUBSTR_INFO_DAC + 1));
PARAM_CHECK(fpForGroup != NULL && fpForUser != NULL && fp != NULL && info != NULL,
goto exit, "Can not open file for load param labels");
......
......@@ -69,7 +69,7 @@ static int LoadParamLabels(const char *fileName, SecurityLabelFunc label, void *
int ret = 0;
FILE *fp = fopen(fileName, "r");
PARAM_CHECK(fp != NULL, return -1, "Open file %s fail", fileName);
SubStringInfo *info = malloc(sizeof(SubStringInfo) * SUBSTR_INFO_DAC + 1);
SubStringInfo *info = malloc(sizeof(SubStringInfo) * (SUBSTR_INFO_DAC + 1));
char buff[PARAM_BUFFER_SIZE];
int infoCount = 0;
ParamAuditData auditData = {};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册