From 71bedfabbfa4d04ff654857094899f6a76e30922 Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Wed, 11 Oct 2017 19:16:25 +1100 Subject: [PATCH] ctdb-tests: Check an unchecked return value This can't fail but check it for completeness... just in case Coverity decides to notice it. Signed-off-by: Martin Schwenke Reviewed-by: Volker Lendecke Autobuild-User(master): Martin Schwenke Autobuild-Date(master): Mon Oct 16 09:27:17 CEST 2017 on sn-devel-144 --- ctdb/tests/src/fake_ctdbd.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ctdb/tests/src/fake_ctdbd.c b/ctdb/tests/src/fake_ctdbd.c index b0a251af9be..af56e08d894 100644 --- a/ctdb/tests/src/fake_ctdbd.c +++ b/ctdb/tests/src/fake_ctdbd.c @@ -1966,11 +1966,17 @@ static void control_reload_nodes_file(TALLOC_CTX *mem_ctx, } if (nodemap->node[i].flags & NODE_FLAGS_DELETED) { + int ret; + node = &node_map->node[i]; node->flags |= NODE_FLAGS_DELETED; - ctdb_sock_addr_from_string("0.0.0.0", &node->addr, - false); + ret = ctdb_sock_addr_from_string("0.0.0.0", &node->addr, + false); + if (ret != 0) { + /* Can't happen, but Coverity... */ + goto fail; + } continue; }