The branch, master has been updated
       via  950db430a51 ctdb-tools: Fix CID 1681637 - Drop unnecessary 
if-statements
      from  9c1fa1244ce docs: smbget: Fix typos and misleading options in 
manpage

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 950db430a5172104c8ecfd5bea92d31d8ded9154
Author: Martin Schwenke <[email protected]>
Date:   Mon Feb 23 14:42:17 2026 +1100

    ctdb-tools: Fix CID 1681637 - Drop unnecessary if-statements
    
    The first was found by Coverity:
    
    >>>     CID 1681637:         Incorrect expression  (IDENTICAL_BRANCHES)
    >>>     The same code is executed when the condition "ret != 0" is
        true or false, because the code in the if-then branch and
        after the if statement is identical. Should the if statement
        be removed?
    
    The second and third are also obvious.
    
    Sorry, missed these in review.
    
    Signed-off-by: Martin Schwenke <[email protected]>
    Signed-off-by: Anoop C S <[email protected]>
    
    Autobuild-User(master): Anoop C S <[email protected]>
    Autobuild-Date(master): Mon Feb 23 08:43:29 UTC 2026 on atb-devel-224

-----------------------------------------------------------------------

Summary of changes:
 ctdb/tools/ctdb.c | 9 ---------
 1 file changed, 9 deletions(-)


Changeset truncated at 500 lines:

diff --git a/ctdb/tools/ctdb.c b/ctdb/tools/ctdb.c
index 1162cff1817..fb1248a873a 100644
--- a/ctdb/tools/ctdb.c
+++ b/ctdb/tools/ctdb.c
@@ -1047,9 +1047,6 @@ static int build_json_node_flags(json_t *parent_obj, 
uint32_t flags)
        }
 
        ret = json_object_set(parent_obj, "flags", flags_map);
-       if (ret != 0) {
-               goto done;
-       }
 done:
        json_decref(flags_map);
        return (ret == 0) ? 0 : 1;
@@ -1158,9 +1155,6 @@ static int build_json_nodemap(json_t *root_object,
                goto done;
        }
        ret = json_object_set(root_object, "node_status", nodemap_obj);
-       if (ret != 0) {
-               goto done;
-       }
 done:
        json_decref(nodes_obj);
        json_decref(nodemap_obj);
@@ -1231,9 +1225,6 @@ static int build_json_vnnmap(json_t *root_object,
                goto done;
        }
        ret = json_object_set(root_object, "vnn_status", vnnmap_obj);
-       if (ret != 0) {
-               goto done;
-       }
 done:
        json_decref(gen_value);
        json_decref(vnn_lst);


-- 
Samba Shared Repository

Reply via email to