fix: 编码规范修复

Signed-off-by: zhushengle <zhushengle@huawei.com>
Change-Id: Idddb6f081546d880560d075395079d95e4112599
This commit is contained in:
zhushengle
2022-03-21 17:02:37 +08:00
parent 45f66359cd
commit 216c124854
18 changed files with 259 additions and 209 deletions

View File

@@ -62,6 +62,7 @@ static int TestCase(void)
rc = stat("/bin/shell", &st);
if (rc == -1) {
perror("stat");
close(shmFd);
return -1;
}
@@ -69,12 +70,14 @@ static int TestCase(void)
rc = ftruncate(shmFd, st.st_size);
if (rc == -1) {
perror("ftruncate");
close(shmFd);
return -1;
}
p = mmap(nullptr, st.st_size, PROT_READ | PROT_WRITE, MAP_SHARED, shmFd, 0);
if (p == MAP_FAILED) {
perror("mmap");
close(shmFd);
return -1;
}
@@ -83,6 +86,7 @@ static int TestCase(void)
if (fd == -1) {
perror("openls");
munmap(p, st.st_size);
close(shmFd);
return -1;
}