]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdb: Save a few lines with talloc_zero()
authorVolker Lendecke <vl@samba.org>
Wed, 6 Nov 2024 10:49:36 +0000 (11:49 +0100)
committerMartin Schwenke <martins@samba.org>
Wed, 6 Nov 2024 23:03:42 +0000 (23:03 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
ctdb/server/ctdb_takeover.c

index 1908c1f1f2606ae240b7e93ee71f07b65b1b1320..1e6d6553e2cbda2bdd4d4e040984f3895326d0ce 100644 (file)
@@ -1555,12 +1555,9 @@ int32_t ctdb_control_tcp_add(struct ctdb_context *ctdb,
 
        /* If this is the first tickle */
        if (tcparray == NULL) {
-               tcparray = talloc(vnn, struct ctdb_tcp_array);
+               tcparray = talloc_zero(vnn, struct ctdb_tcp_array);
                CTDB_NO_MEMORY(ctdb, tcparray);
                vnn->tcp_array = tcparray;
-
-               tcparray->num = 0;
-               tcparray->connections = NULL;
        }
 
        /* A new tickle, we must add it to the array */