From 3fcfbfe307ddc0bc02053ef17ecf29a3b3f9463e Mon Sep 17 00:00:00 2001 From: Zhu Jun Date: Sun, 10 Nov 2024 22:23:12 -0800 Subject: [PATCH] samples/bpf: Remove unused variables in tc_l2_redirect_kern.c These variables are never referenced in the code, just remove them. Signed-off-by: Zhu Jun Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20241111062312.3541-1-zhujun2@cmss.chinamobile.com --- samples/bpf/tc_l2_redirect_kern.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/samples/bpf/tc_l2_redirect_kern.c b/samples/bpf/tc_l2_redirect_kern.c index 0b48f7ddf521..b19fa9b88fe0 100644 --- a/samples/bpf/tc_l2_redirect_kern.c +++ b/samples/bpf/tc_l2_redirect_kern.c @@ -63,8 +63,6 @@ int _l2_to_iptun_ingress_forward(struct __sk_buff *skb) void *data_end = (void *)(long)skb->data_end; int key = 0, *ifindex; - int ret; - if (data + sizeof(*eth) > data_end) return TC_ACT_OK; @@ -114,8 +112,6 @@ int _l2_to_iptun_ingress_redirect(struct __sk_buff *skb) void *data_end = (void *)(long)skb->data_end; int key = 0, *ifindex; - int ret; - if (data + sizeof(*eth) > data_end) return TC_ACT_OK; -- 2.50.1