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
*/
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);