diff --git a/.clang-format b/.clang-format index 622871d2284..01e1f2386ce 100644 --- a/.clang-format +++ b/.clang-format @@ -10,7 +10,6 @@ AlignTrailingComments: false AllowAllParametersOfDeclarationOnNextLine: false AllowShortBlocksOnASingleLine: false AllowShortEnumsOnASingleLine: false -AllowShortEnumsOnASingleLine: false AllowShortFunctionsOnASingleLine: Inline AllowShortIfStatementsOnASingleLine: false AllowShortLoopsOnASingleLine: false diff --git a/bpf/process/pfilter.h b/bpf/process/pfilter.h index af67ac8374d..5da326b9238 100644 --- a/bpf/process/pfilter.h +++ b/bpf/process/pfilter.h @@ -252,8 +252,7 @@ process_filter_capabilities(__u32 ty, __u32 op, __u32 ns, __u64 val, if (op == op_filter_in) return (caps & val) ? PFILTER_ACCEPT : PFILTER_REJECT; - return (caps & val) ? PFILTER_REJECT : - PFILTER_ACCEPT; /* op_filter_notin */ + return (caps & val) ? PFILTER_REJECT : PFILTER_ACCEPT; /* op_filter_notin */ } #ifdef __CAP_CHANGES_FILTER diff --git a/bpf/process/types/basic.h b/bpf/process/types/basic.h index 3e850156f2f..727bee11ddf 100644 --- a/bpf/process/types/basic.h +++ b/bpf/process/types/basic.h @@ -811,7 +811,7 @@ __copy_char_iovec(long off, unsigned long arg, unsigned long cnt, /* PARSE_IOVEC_ENTRIES will jump here when done or return error */ char_iovec_done : - s = (int *)args_off(e, off_orig); + s = (int *)args_off(e, off_orig); s[0] = size; s[1] = size; return size + 8; diff --git a/bpf/test/bpf_lseek.c b/bpf/test/bpf_lseek.c index 4b48ab3532e..16c18ba7b84 100644 --- a/bpf/test/bpf_lseek.c +++ b/bpf/test/bpf_lseek.c @@ -8,22 +8,22 @@ #include "bpf_task.h" /* -* # cat /sys/kernel/debug/tracing/events/syscalls/sys_enter_lseek/format -* name: sys_enter_lseek -* ID: 682 -* format: -* field:unsigned short common_type; offset:0; size:2; signed:0; -* field:unsigned char common_flags; offset:2; size:1; signed:0; -* field:unsigned char common_preempt_count; offset:3; size:1; signed:0; -* field:int common_pid; offset:4; size:4; signed:1; -* -* field:int __syscall_nr; offset:8; size:4; signed:1; -* field:unsigned int fd; offset:16; size:8; signed:0; -* field:off_t offset; offset:24; size:8; signed:0; -* field:unsigned int whence; offset:32; size:8; signed:0; -* -* print fmt: "fd: 0x%08lx, offset: 0x%08lx, whence: 0x%08lx", ((unsigned long)(REC->fd)), ((unsigned long)(REC->offset)), ((unsigned long)(REC->whence)) -*/ + * # cat /sys/kernel/debug/tracing/events/syscalls/sys_enter_lseek/format + * name: sys_enter_lseek + * ID: 682 + * format: + * field:unsigned short common_type; offset:0; size:2; signed:0; + * field:unsigned char common_flags; offset:2; size:1; signed:0; + * field:unsigned char common_preempt_count; offset:3; size:1; signed:0; + * field:int common_pid; offset:4; size:4; signed:1; + * + * field:int __syscall_nr; offset:8; size:4; signed:1; + * field:unsigned int fd; offset:16; size:8; signed:0; + * field:off_t offset; offset:24; size:8; signed:0; + * field:unsigned int whence; offset:32; size:8; signed:0; + * + * print fmt: "fd: 0x%08lx, offset: 0x%08lx, whence: 0x%08lx", ((unsigned long)(REC->fd)), ((unsigned long)(REC->offset)), ((unsigned long)(REC->whence)) + */ struct sys_enter_lseek_args { __u16 common_type; __u8 common_flags;