diff options
author | Martin Schwenke <martin@meltin.net> | 2019-11-12 12:14:18 +1100 |
---|---|---|
committer | Amitay Isaacs <amitay@samba.org> | 2019-11-14 03:45:44 +0000 |
commit | e45feaf28da27653e9df36c7c50cbd54a792a2aa (patch) | |
tree | be1728104b7004e3585d28ab5bb7dc7d6140ae68 | |
parent | 750f3938e4fcd6743954db6b1132751a90ee6107 (diff) | |
download | samba-e45feaf28da27653e9df36c7c50cbd54a792a2aa.tar.gz |
ctdb-tcp: Simplify freeing of transport data on shutdown
The type-checking is superfluous and gets in the way of readability.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Thu Nov 14 03:45:44 UTC 2019 on sn-devel-184
-rw-r--r-- | ctdb/tcp/tcp_init.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/ctdb/tcp/tcp_init.c b/ctdb/tcp/tcp_init.c index 5bd9e2f3a09..559ad8691d0 100644 --- a/ctdb/tcp/tcp_init.c +++ b/ctdb/tcp/tcp_init.c @@ -135,12 +135,9 @@ static void ctdb_tcp_restart(struct ctdb_node *node) */ static void ctdb_tcp_shutdown(struct ctdb_context *ctdb) { - struct ctdb_tcp *ctcp = talloc_get_type(ctdb->transport_data, - struct ctdb_tcp); uint32_t i; - talloc_free(ctcp); - ctdb->transport_data = NULL; + TALLOC_FREE(ctdb->transport_data); for (i=0; i<ctdb->num_nodes; i++) { TALLOC_FREE(ctdb->nodes[i]->transport_data); |