mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:37:35 +00:00
Meta+Userland: Make clang-format-10 clean
This commit is contained in:
parent
934d4d4033
commit
a2feef17bf
7 changed files with 27 additions and 31 deletions
|
@ -31,30 +31,29 @@
|
|||
#include <sys/mman.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#define EXPECT_OK(syscall, address, size) \
|
||||
do { \
|
||||
rc = syscall(fd, (void*)(address), (size_t)(size)); \
|
||||
if (rc < 0) { \
|
||||
#define EXPECT_OK(syscall, address, size) \
|
||||
do { \
|
||||
rc = syscall(fd, (void*)(address), (size_t)(size)); \
|
||||
if (rc < 0) { \
|
||||
fprintf(stderr, "Expected success: " #syscall "(%p, %zu), got rc=%d, errno=%d\n", (void*)(address), (size_t)(size), rc, errno); \
|
||||
} \
|
||||
} while(0)
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define EXPECT_EFAULT(syscall, address, size) \
|
||||
do { \
|
||||
rc = syscall(fd, (void*)(address), (size_t)(size)); \
|
||||
if (rc >= 0 || errno != EFAULT) { \
|
||||
#define EXPECT_EFAULT(syscall, address, size) \
|
||||
do { \
|
||||
rc = syscall(fd, (void*)(address), (size_t)(size)); \
|
||||
if (rc >= 0 || errno != EFAULT) { \
|
||||
fprintf(stderr, "Expected EFAULT: " #syscall "(%p, %zu), got rc=%d, errno=%d\n", (void*)(address), (size_t)(size), rc, errno); \
|
||||
} \
|
||||
} while(0)
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define EXPECT_EFAULT_NO_FD(syscall, address, size) \
|
||||
do { \
|
||||
rc = syscall((address), (size_t)(size)); \
|
||||
if (rc >= 0 || errno != EFAULT) { \
|
||||
#define EXPECT_EFAULT_NO_FD(syscall, address, size) \
|
||||
do { \
|
||||
rc = syscall((address), (size_t)(size)); \
|
||||
if (rc >= 0 || errno != EFAULT) { \
|
||||
fprintf(stderr, "Expected EFAULT: " #syscall "(%p, %zu), got rc=%d, errno=%d\n", (void*)(address), (size_t)(size), rc, errno); \
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
int main(int, char**)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue