Index: sandbox/linux/seccomp-bpf/syscall_iterator.cc |
diff --git a/sandbox/linux/seccomp-bpf/syscall_iterator.cc b/sandbox/linux/seccomp-bpf/syscall_iterator.cc |
index 583dcf6e9cb55166f6866d45d8a62514a14d376f..59a4e8630674f00b1ebbeb06867aa0ff08a85e83 100644 |
--- a/sandbox/linux/seccomp-bpf/syscall_iterator.cc |
+++ b/sandbox/linux/seccomp-bpf/syscall_iterator.cc |
@@ -16,7 +16,8 @@ uint32_t SyscallIterator::Next() { |
do { |
// |num_| has been initialized to 0, which we assume is also MIN_SYSCALL. |
// This true for supported architectures (Intel and ARM EABI). |
- CHECK_EQ(MIN_SYSCALL, 0u); |
+ COMPILE_ASSERT(MIN_SYSCALL == 0u, |
+ min_syscall_should_always_be_zero); |
val = num_; |
// First we iterate up to MAX_PUBLIC_SYSCALL, which is equal to MAX_SYSCALL |
@@ -78,14 +79,16 @@ bool SyscallIterator::IsValid(uint32_t num) { |
return false; |
} |
-bool SyscallIterator::IsArmPrivate(uint32_t num) { |
#if defined(__arm__) && (defined(__thumb__) || defined(__ARM_EABI__)) |
+bool SyscallIterator::IsArmPrivate(uint32_t num) { |
return (num >= MIN_PRIVATE_SYSCALL && num <= MAX_PRIVATE_SYSCALL) || |
(num >= MIN_GHOST_SYSCALL && num <= MAX_SYSCALL); |
+} |
#else |
+bool SyscallIterator::IsArmPrivate(uint32_t) { |
return false; |
-#endif |
} |
+#endif |
} // namespace |