Skip to content

Commit

Permalink
samples: bpf: Drop doubled variable declaration in xdpsock
Browse files Browse the repository at this point in the history
Seems that by accident there is a doubled declaration of global variable
opt_xdp_bind_flags in xdpsock_user.c. The second one is uninitialized so
compiler was simply ignoring it.

To keep things clean, drop the doubled variable.

Fixes: c543f54 ("samples/bpf: add unaligned chunks mode support to xdpsock")
Signed-off-by: Maciej Fijalkowski <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Acked-by: Björn Töpel <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
  • Loading branch information
mfijalko authored and borkmann committed Feb 5, 2020
1 parent c77e9f0 commit 32c92c1
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion samples/bpf/xdpsock_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ static u32 opt_xdp_bind_flags = XDP_USE_NEED_WAKEUP;
static u32 opt_umem_flags;
static int opt_unaligned_chunks;
static int opt_mmap_flags;
static u32 opt_xdp_bind_flags;
static int opt_xsk_frame_size = XSK_UMEM__DEFAULT_FRAME_SIZE;
static int opt_timeout = 1000;
static bool opt_need_wakeup = true;
Expand Down

0 comments on commit 32c92c1

Please sign in to comment.