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/3] alfred: Check if tg hash was really initialized
Date: Thu, 1 Jun 2017 08:26:30 +0200 [thread overview]
Message-ID: <20170601062632.4239-1-sven@narfation.org> (raw)
The return value check after the tg_hash_new call must actually check the
return value and not some other datastructure.
Fixes: a7bc3d9a2b3f ("alfred: Cache the global translation table entries")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
---
server.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/server.c b/server.c
index 1e358cf..9774281 100644
--- a/server.c
+++ b/server.c
@@ -232,7 +232,7 @@ static void update_server_info(struct globals *globals)
if (strcmp(globals->mesh_iface, "none") != 0) {
tg_hash = tg_hash_new(globals->mesh_iface);
- if (!globals->data_hash) {
+ if (!tg_hash) {
fprintf(stderr, "Failed to create translation hash\n");
return;
}
--
2.11.0
next reply other threads:[~2017-06-01 6:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-01 6:26 Sven Eckelmann [this message]
2017-06-01 6:26 ` [B.A.T.M.A.N.] [PATCH 2/3] alfred: Always initialize orig cache hash pointer Sven Eckelmann
2017-06-01 6:26 ` [B.A.T.M.A.N.] [PATCH 3/3] alfred: Always initialize translation " Sven Eckelmann
2017-06-01 8:15 ` [B.A.T.M.A.N.] [PATCH 1/3] alfred: Check if tg hash was really initialized Simon Wunderlich
2017-06-01 8:25 ` Sven Eckelmann
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=20170601062632.4239-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.