Skip to content

Commit 20cdeb5

Browse files
yuziboborkmann
authored andcommitted
bpf, tracex3_user: erase "ARRAY_SIZE" redefined
There is a warning when compiling bpf sample programs in sample/bpf: make -C /home/foo/bpf/samples/bpf/../../tools/lib/bpf/ RM='rm -rf' LDFLAGS= srctree=/home/foo/bpf/samples/bpf/../../ O= HOSTCC /home/foo/bpf/samples/bpf/tracex3_user.o /home/foo/bpf/samples/bpf/tracex3_user.c:20:0: warning: "ARRAY_SIZE" redefined #define ARRAY_SIZE(x) (sizeof(x) / sizeof(*(x))) In file included from /home/foo/bpf/samples/bpf/tracex3_user.c:18:0: ./tools/testing/selftests/bpf/bpf_util.h:48:0: note: this is the location of the previous definition # define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) Signed-off-by: Bo YU <tsu.yubo@gmail.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
1 parent fc1dc76 commit 20cdeb5

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

samples/bpf/tracex3_user.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
#include "bpf_load.h"
1818
#include "bpf_util.h"
1919

20-
#define ARRAY_SIZE(x) (sizeof(x) / sizeof(*(x)))
21-
2220
#define SLOTS 100
2321

2422
static void clear_stats(int fd)

0 commit comments

Comments
 (0)