lkml.org 
[lkml]   [2020]   [Aug]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] libbpf: simplify the return expression of build_map_pin_path()
From
Date


On 8/18/20 1:20 AM, Xu Wang wrote:
> Simplify the return expression.
>
> Signed-off-by: Xu Wang <vulab@iscas.ac.cn>

Also, please tag your patch targeting to 'bpf-next' tree like
[PATCH bpf-next] so people knows which tree the patch targets.

> ---
> tools/lib/bpf/libbpf.c | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
> index 5055e1531e43..b423fdaae0b6 100644
> --- a/tools/lib/bpf/libbpf.c
> +++ b/tools/lib/bpf/libbpf.c
> @@ -1935,11 +1935,7 @@ static int build_map_pin_path(struct bpf_map *map, const char *path)
> else if (len >= PATH_MAX)
> return -ENAMETOOLONG;
>
> - err = bpf_map__set_pin_path(map, buf);
> - if (err)
> - return err;
> -
> - return 0;
> + return bpf_map__set_pin_path(map, buf);
> }
>
>
>

\
 
 \ /
  Last update: 2020-08-18 17:53    [W:0.188 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site