selftests/bpf/progs: replace typeof() with __auto_type
Subsystems (3)
PATCH 1/1 selftests/bpf/progs: replace typeof() with __auto_type
Replace typeof() with __auto_type in bpf_dctcp.c. __auto_type was introduced in GCC 4.9 and reduces the compile time for all compilers. No functional changes intended.
Signed-off-by Pranav Tyagi <[email protected]>
--- tools/testing/selftests/bpf/progs/bpf_dctcp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
tools/testing/selftests/bpf/progs/bpf_dctcp.c +2 -2
@@ -16,8 +16,8 @@#define min (a, b) ((a) < (b) ? (a) : (b))#define max (a, b) ((a) > (b) ? (a) : (b))#define min_not_zero (x, y) ({ \ - typeof(x) __x = (x); \ - typeof(y) __y = (y); \ + __auto_type __x = (x); \ + __auto_type __y = (y); \ __x == 0 ? __y : ((__y == 0) ? __x : min(__x, __y)); })static bool before (__u32 seq1,__u32 seq2) {
Signature · 1 line
2.49.0