public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
* [B.A.T.M.A.N.] [PATCH 1/3] alfred: Check if tg hash was really initialized
@ 2017-06-01  6:26 Sven Eckelmann
  2017-06-01  6:26 ` [B.A.T.M.A.N.] [PATCH 2/3] alfred: Always initialize orig cache hash pointer Sven Eckelmann
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Sven Eckelmann @ 2017-06-01  6:26 UTC (permalink / raw)
  To: b.a.t.m.a.n

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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-06-01  8:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-01  6:26 [B.A.T.M.A.N.] [PATCH 1/3] alfred: Check if tg hash was really initialized Sven Eckelmann
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox