Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Xu Wang <vulab@iscas.ac.cn>
To: ast@kernel.org, daniel@iogearbox.net, kafai@fb.com,
songliubraving@fb.com, yhs@fb.com, andriin@fb.com,
john.fastabend@gmail.com, kpsingh@chromium.org,
netdev@vger.kernel.org, bpf@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Xu Wang <vulab@iscas.ac.cn>
Subject: [PATCH] libbpf: simplify the return expression of build_map_pin_path()
Date: Tue, 18 Aug 2020 08:20:08 +0000 [thread overview]
Message-ID: <20200818082008.12143-1-vulab@iscas.ac.cn> (raw)
Simplify the return expression.
Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
---
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);
}
--
2.17.1
next reply other threads:[~2020-08-18 8:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-18 8:20 Xu Wang [this message]
2020-08-18 15:50 ` Yonghong Song
2020-08-18 15:51 ` Yonghong Song
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200818082008.12143-1-vulab@iscas.ac.cn \
--to=vulab@iscas.ac.cn \
--cc=andriin@fb.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=john.fastabend@gmail.com \
--cc=kafai@fb.com \
--cc=kpsingh@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=songliubraving@fb.com \
--cc=yhs@fb.com \
--subject='Re: [PATCH] libbpf: simplify the return expression of build_map_pin_path()' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).