diff options
author | danakj <danakj@chromium.org> | 2015-11-11 19:44:54 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-11-12 03:46:24 +0000 |
commit | 7760fa151cd15eb34919aa87727438bf5e2c8e6e (patch) | |
tree | ef35a7c78ad404009ddf03b610e532e794d6cc3f | |
parent | ebb50aa1b6d1a7ccb6eb892aca79dd6de4910d55 (diff) | |
download | chromium_src-7760fa151cd15eb34919aa87727438bf5e2c8e6e.zip chromium_src-7760fa151cd15eb34919aa87727438bf5e2c8e6e.tar.gz chromium_src-7760fa151cd15eb34919aa87727438bf5e2c8e6e.tar.bz2 |
Replace decltype(nullptr) with std::nullptr_t.
We have C++11 library support and this is allowed now, so use it.
R=mdempsky@chromium.org
Review URL: https://codereview.chromium.org/1440863003
Cr-Commit-Position: refs/heads/master@{#359248}
-rw-r--r-- | sandbox/linux/services/syscall_wrappers.cc | 6 | ||||
-rw-r--r-- | sandbox/linux/services/syscall_wrappers.h | 8 |
2 files changed, 8 insertions, 6 deletions
diff --git a/sandbox/linux/services/syscall_wrappers.cc b/sandbox/linux/services/syscall_wrappers.cc index 3a276f1..9d5a6ad 100644 --- a/sandbox/linux/services/syscall_wrappers.cc +++ b/sandbox/linux/services/syscall_wrappers.cc @@ -33,10 +33,10 @@ pid_t sys_gettid(void) { } long sys_clone(unsigned long flags, - decltype(nullptr) child_stack, + std::nullptr_t child_stack, pid_t* ptid, pid_t* ctid, - decltype(nullptr) tls) { + std::nullptr_t tls) { const bool clone_tls_used = flags & CLONE_SETTLS; const bool invalid_ctid = (flags & (CLONE_CHILD_SETTID | CLONE_CHILD_CLEARTID)) && !ctid; @@ -139,7 +139,7 @@ int sys_unshare(int flags) { return syscall(__NR_unshare, flags); } -int sys_sigprocmask(int how, const sigset_t* set, decltype(nullptr) oldset) { +int sys_sigprocmask(int how, const sigset_t* set, std::nullptr_t oldset) { // In some toolchain (in particular Android and PNaCl toolchain), // sigset_t is 32 bits, but the Linux ABI uses more. LinuxSigSet linux_value; diff --git a/sandbox/linux/services/syscall_wrappers.h b/sandbox/linux/services/syscall_wrappers.h index 581425a..057e4c8 100644 --- a/sandbox/linux/services/syscall_wrappers.h +++ b/sandbox/linux/services/syscall_wrappers.h @@ -9,6 +9,8 @@ #include <stdint.h> #include <sys/types.h> +#include <cstddef> + #include "sandbox/sandbox_export.h" struct sock_fprog; @@ -32,10 +34,10 @@ SANDBOX_EXPORT long sys_clone(unsigned long flags); // nullptr, since otherwise this function cannot safely return. As a // consequence, this function does not support CLONE_VM. SANDBOX_EXPORT long sys_clone(unsigned long flags, - decltype(nullptr) child_stack, + std::nullptr_t child_stack, pid_t* ptid, pid_t* ctid, - decltype(nullptr) regs); + std::nullptr_t regs); SANDBOX_EXPORT void sys_exit_group(int status); @@ -71,7 +73,7 @@ SANDBOX_EXPORT int sys_unshare(int flags); // because of some ABI gap between toolchain's and Linux's. SANDBOX_EXPORT int sys_sigprocmask(int how, const sigset_t* set, - decltype(nullptr) oldset); + std::nullptr_t oldset); // Some libcs do not expose a sigaction(). SANDBOX_EXPORT int sys_sigaction(int signum, |