mirror of
https://github.com/netdata/libbpf.git
synced 2026-03-29 04:39:06 +08:00
libbpf: Remove unnecessary type cast
The link variable is already of type 'struct bpf_link *', casting it to 'struct bpf_link *' is redundant, drop it. Signed-off-by: Yuntao Wang <ytcoode@gmail.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/bpf/20220424143420.457082-1-ytcoode@gmail.com
This commit is contained in:
committed by
Andrii Nakryiko
parent
0d4cefc4fc
commit
56dff81d46
@@ -11270,7 +11270,7 @@ static struct bpf_link *bpf_program__attach_btf_id(const struct bpf_program *pro
|
|||||||
return libbpf_err_ptr(pfd);
|
return libbpf_err_ptr(pfd);
|
||||||
}
|
}
|
||||||
link->fd = pfd;
|
link->fd = pfd;
|
||||||
return (struct bpf_link *)link;
|
return link;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct bpf_link *bpf_program__attach_trace(const struct bpf_program *prog)
|
struct bpf_link *bpf_program__attach_trace(const struct bpf_program *prog)
|
||||||
|
|||||||
Reference in New Issue
Block a user