mirror of
https://github.com/samba-team/samba.git
synced 2025-01-05 09:18:06 +03:00
ctdb: Save a few lines with talloc_zero()
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
This commit is contained in:
parent
762f5f5ca6
commit
e080add68a
@ -1555,12 +1555,9 @@ int32_t ctdb_control_tcp_add(struct ctdb_context *ctdb,
|
|||||||
|
|
||||||
/* If this is the first tickle */
|
/* If this is the first tickle */
|
||||||
if (tcparray == NULL) {
|
if (tcparray == NULL) {
|
||||||
tcparray = talloc(vnn, struct ctdb_tcp_array);
|
tcparray = talloc_zero(vnn, struct ctdb_tcp_array);
|
||||||
CTDB_NO_MEMORY(ctdb, tcparray);
|
CTDB_NO_MEMORY(ctdb, tcparray);
|
||||||
vnn->tcp_array = tcparray;
|
vnn->tcp_array = tcparray;
|
||||||
|
|
||||||
tcparray->num = 0;
|
|
||||||
tcparray->connections = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* A new tickle, we must add it to the array */
|
/* A new tickle, we must add it to the array */
|
||||||
|
Loading…
Reference in New Issue
Block a user