diff options
author | Michael Pratt <mpratt@google.com> | 2020-01-28 11:06:24 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-01-28 11:18:17 -0800 |
commit | 74e04506a430535b7f3461eb35f36c9398db735a (patch) | |
tree | fe375778acd59066529a39d44545f810970ce996 /test/syscalls/linux/mempolicy.cc | |
parent | 5d569408ef94c753b7aae9392b5e4ebf7e5ea50d (diff) |
Prefer Type& over Type &
And Type* over Type *. This is basically a whitespace only change.
gVisor code already prefers left-alignment of pointers and references, but
clang-format formats for consistency with the majority of a file, and some
files leaned the wrong way. This is a one-time pass to make us completely
conforming.
Autogenerated with:
$ find . \( -name "*.cc" -or -name "*.c" -or -name "*.h" \) \
| xargs clang-format -i -style="{BasedOnStyle: Google, \
DerivePointerAlignment: false, PointerAlignment: Left}"
PiperOrigin-RevId: 291972421
Diffstat (limited to 'test/syscalls/linux/mempolicy.cc')
-rw-r--r-- | test/syscalls/linux/mempolicy.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/test/syscalls/linux/mempolicy.cc b/test/syscalls/linux/mempolicy.cc index d21093899..059fad598 100644 --- a/test/syscalls/linux/mempolicy.cc +++ b/test/syscalls/linux/mempolicy.cc @@ -43,17 +43,17 @@ namespace { #define MPOL_MF_MOVE (1 << 1) #define MPOL_MF_MOVE_ALL (1 << 2) -int get_mempolicy(int *policy, uint64_t *nmask, uint64_t maxnode, void *addr, +int get_mempolicy(int* policy, uint64_t* nmask, uint64_t maxnode, void* addr, int flags) { return syscall(SYS_get_mempolicy, policy, nmask, maxnode, addr, flags); } -int set_mempolicy(int mode, uint64_t *nmask, uint64_t maxnode) { +int set_mempolicy(int mode, uint64_t* nmask, uint64_t maxnode) { return syscall(SYS_set_mempolicy, mode, nmask, maxnode); } -int mbind(void *addr, unsigned long len, int mode, - const unsigned long *nodemask, unsigned long maxnode, +int mbind(void* addr, unsigned long len, int mode, + const unsigned long* nodemask, unsigned long maxnode, unsigned flags) { return syscall(SYS_mbind, addr, len, mode, nodemask, maxnode, flags); } @@ -68,7 +68,7 @@ Cleanup ScopedMempolicy() { // Temporarily change the memory policy for the calling thread within the // caller's scope. -PosixErrorOr<Cleanup> ScopedSetMempolicy(int mode, uint64_t *nmask, +PosixErrorOr<Cleanup> ScopedSetMempolicy(int mode, uint64_t* nmask, uint64_t maxnode) { if (set_mempolicy(mode, nmask, maxnode)) { return PosixError(errno, "set_mempolicy"); @@ -213,7 +213,7 @@ TEST(MempolicyTest, GetMempolicyQueryNodeForAddress) { } } - void *invalid_address = reinterpret_cast<void *>(-1); + void* invalid_address = reinterpret_cast<void*>(-1); // Invalid address. ASSERT_THAT(get_mempolicy(&mode, nullptr, 0, invalid_address, @@ -221,8 +221,8 @@ TEST(MempolicyTest, GetMempolicyQueryNodeForAddress) { SyscallFailsWithErrno(EFAULT)); // Invalid mode pointer. - ASSERT_THAT(get_mempolicy(reinterpret_cast<int *>(invalid_address), nullptr, - 0, &dummy_stack_address, MPOL_F_ADDR | MPOL_F_NODE), + ASSERT_THAT(get_mempolicy(reinterpret_cast<int*>(invalid_address), nullptr, 0, + &dummy_stack_address, MPOL_F_ADDR | MPOL_F_NODE), SyscallFailsWithErrno(EFAULT)); } |