Fix some minor formatting

This commit is contained in:
Your Name 2021-11-29 17:38:06 +00:00
parent af2fcbc1d4
commit 2cdd75a274
2 changed files with 10 additions and 10 deletions

View File

@ -10,13 +10,13 @@
int seccomp_event_create(void) {
#ifdef SYS_eventfd
#ifdef SYS_eventfd
int fd = syscall(SYS_eventfd, 0, 0);
#else
# ifdef SYS_eventfd2
#else
#ifdef SYS_eventfd2
int fd = syscall(SYS_eventfd2, 0, 0);
# endif
#endif
#endif
#endif
if (fd < 0) { FFATAL("seccomp_event_create"); }
return fd;

View File

@ -72,13 +72,13 @@ static struct sock_filter filter[] = {
/* Allow us to make anonymous maps */
BPF_STMT(BPF_LD | BPF_W | BPF_ABS, (offsetof(struct seccomp_data, nr))),
#ifdef __NR_mmap
#ifdef __NR_mmap
BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, __NR_mmap, 0, 3),
#else
# ifdef __NR_mmap2
#else
#ifdef __NR_mmap2
BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, __NR_mmap2, 0, 3),
# endif
#endif
#endif
#endif
BPF_STMT(BPF_LD | BPF_W | BPF_ABS,
(offsetof(struct seccomp_data, args[4]))),
BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, -1, 0, 1),