diff options
| author | Yuntao Wang <[email protected]> | 2022-04-24 14:34:20 +0000 |
|---|---|---|
| committer | Daniel Borkmann <[email protected]> | 2022-04-25 15:39:16 +0000 |
| commit | 003fed595c0f37d0ad112447f5f942654979426c (patch) | |
| tree | 87d8d6feeb9a8f70416a1b94a3af41fa1dd5e298 /tools/lib/bpf/libbpf.c | |
| parent | selftests/bpf: Switch fexit_stress to bpf_link_create() API (diff) | |
| download | kernel-003fed595c0f37d0ad112447f5f942654979426c.tar.gz kernel-003fed595c0f37d0ad112447f5f942654979426c.zip | |
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 <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/lib/bpf/libbpf.c')
| -rw-r--r-- | tools/lib/bpf/libbpf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c index 9a213aaaac8a..cc1a8fc47f72 100644 --- a/tools/lib/bpf/libbpf.c +++ b/tools/lib/bpf/libbpf.c @@ -11270,7 +11270,7 @@ static struct bpf_link *bpf_program__attach_btf_id(const struct bpf_program *pro return libbpf_err_ptr(pfd); } link->fd = pfd; - return (struct bpf_link *)link; + return link; } struct bpf_link *bpf_program__attach_trace(const struct bpf_program *prog) |
