From: Sven Eckelmann <sven@narfation.org>
To: b.a.t.m.a.n@lists.open-mesh.org
Subject: [B.A.T.M.A.N.] [PATCH 1/2] alfred: Only query debugfs when netlink failed
Date: Mon, 9 Oct 2017 17:33:06 +0200 [thread overview]
Message-ID: <20171009153307.29245-1-sven@narfation.org> (raw)
It is enough to just request the data from netlink and skip debugfs when
netlink didn't return an error. The overwrite of the ret variable was only
for testing purposes and should no longer be used.
Fixes: a7bc3d9a2b3f ("alfred: Cache the global translation table entries")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
---
batadv_query.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/batadv_query.c b/batadv_query.c
index 8580f1b..78b92cd 100644
--- a/batadv_query.c
+++ b/batadv_query.c
@@ -308,7 +308,6 @@ struct hashtable_t *tg_hash_new(const char *mesh_iface)
ret = translate_mac_netlink(mesh_iface, tg_hash);
enable_net_admin_capability(0);
- ret = -EOPNOTSUPP;
if (ret == -EOPNOTSUPP)
translate_mac_debugfs(mesh_iface, tg_hash);
@@ -477,7 +476,6 @@ struct hashtable_t *orig_hash_new(const char *mesh_iface)
ret = get_tq_netlink(mesh_iface, orig_hash);
enable_net_admin_capability(0);
- ret = -EOPNOTSUPP;
if (ret == -EOPNOTSUPP)
get_tq_debugfs(mesh_iface, orig_hash);
--
2.11.0
next reply other threads:[~2017-10-09 15:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-09 15:33 Sven Eckelmann [this message]
2017-10-09 15:33 ` [B.A.T.M.A.N.] [PATCH 2/2] alfred: Only check for minimal length of fixed size packets Sven Eckelmann
2017-10-23 15:27 ` [B.A.T.M.A.N.] [PATCH 1/2] alfred: Only query debugfs when netlink failed Simon Wunderlich
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=20171009153307.29245-1-sven@narfation.org \
--to=sven@narfation.org \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox