Repository : ssh://git@open-mesh.org/alfred
On branch : master
commit 924ed58a1a59b287f0968006fc659a4f9fa7590b Author: Sven Eckelmann sven@narfation.org Date: Thu Jun 1 08:26:30 2017 +0200
alfred: Check if tg hash was really initialized
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 Signed-off-by: Simon Wunderlich simon.wunderlich@openmesh.com
924ed58a1a59b287f0968006fc659a4f9fa7590b 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; }