From: Zhu Jun Date: Mon, 11 Nov 2024 06:23:12 +0000 (-0800) Subject: samples/bpf: Remove unused variables in tc_l2_redirect_kern.c X-Git-Tag: v6.13-rc1~136^2~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3fcfbfe307ddc0bc02053ef17ecf29a3b3f9463e;p=thirdparty%2Fkernel%2Flinux.git 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 --- diff --git a/samples/bpf/tc_l2_redirect_kern.c b/samples/bpf/tc_l2_redirect_kern.c index 0b48f7ddf5219..b19fa9b88fe0a 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;