diff options
author | Alexander Potapenko <glider@google.com> | 2013-08-06 14:07:46 +0000 |
---|---|---|
committer | Alexander Potapenko <glider@google.com> | 2013-08-06 14:07:46 +0000 |
commit | a74047af8eb56e41cbb765d296b79e07ce4803b3 (patch) | |
tree | c25cf294b8e5b2cebb0c9de2b11abeb170c04c7a /lib/sanitizer_common/sanitizer_common_syscalls.inc | |
parent | 39d68edd461abb5058a4b96fd16f1741ad89bba7 (diff) |
[libsanitizer] Drive-by fix for -Wempty-body in sanitizer_common_syscalls.inc
This makes the file consistently use { } around the if statements containing the PRE_/POST_ macros.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@187797 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/sanitizer_common_syscalls.inc')
-rw-r--r-- | lib/sanitizer_common/sanitizer_common_syscalls.inc | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/lib/sanitizer_common/sanitizer_common_syscalls.inc b/lib/sanitizer_common/sanitizer_common_syscalls.inc index 87d684130..1b32187cb 100644 --- a/lib/sanitizer_common/sanitizer_common_syscalls.inc +++ b/lib/sanitizer_common/sanitizer_common_syscalls.inc @@ -145,29 +145,41 @@ POST_SYSCALL(waitpid)(long res, int pid, int *status, int options) { } PRE_SYSCALL(clock_gettime)(int clk_id, struct sanitizer_kernel_timespec *tp) { - if (tp) PRE_WRITE(tp, sizeof(*tp)); + if (tp) { + PRE_WRITE(tp, sizeof(*tp)); + } } POST_SYSCALL(clock_gettime)(long res, int clk_id, struct sanitizer_kernel_timespec *tp) { - if (res == 0 && tp) POST_WRITE(tp, sizeof(*tp)); + if (res == 0 && tp) { + POST_WRITE(tp, sizeof(*tp)); + } } PRE_SYSCALL(clock_getres)(int clk_id, struct sanitizer_kernel_timespec *tp) { - if (tp) PRE_WRITE(tp, sizeof(*tp)); + if (tp) { + PRE_WRITE(tp, sizeof(*tp)); + } } POST_SYSCALL(clock_getres)(long res, int clk_id, struct sanitizer_kernel_timespec *tp) { - if (res == 0 && tp) POST_WRITE(tp, sizeof(*tp)); + if (res == 0 && tp) { + POST_WRITE(tp, sizeof(*tp)); + } } PRE_SYSCALL(read)(unsigned int fd, void *buf, uptr count) { - if (buf) PRE_WRITE(buf, count); + if (buf) { + PRE_WRITE(buf, count); + } } POST_SYSCALL(read)(long res, unsigned int fd, void *buf, uptr count) { - if (res > 0 && buf) POST_WRITE(buf, res); + if (res > 0 && buf) { + POST_WRITE(buf, res); + } } } // extern "C" |