1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 03:07:43 +00:00

Meta+Userland: Make clang-format-10 clean

This commit is contained in:
Ben Wiederhake 2020-09-18 09:49:51 +02:00 committed by Andreas Kling
parent 934d4d4033
commit a2feef17bf
7 changed files with 27 additions and 31 deletions

View file

@ -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**)
{