From dc413d4126d02be71a014786e17e7b605443e887 Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Sat, 29 Jul 2017 14:16:07 +0200 Subject: refcount: typecast function for calling on free All of the functions called to free the refcounted structure are doing a typecast from (void*) to their own type taht is being free'd. This really is not needed and the refcount interface is made a little simpler without the requirement of typecasting. With this small improvement in the API, all callers are updated too. Cherry picked from commit f2ca301bd741e3e3f076cd3f72fcd377bcef2a1a: > Change-Id: I32473b6d1799f62861d4b2d78ea30c09e6c80ab1 > BUG: 1416889 > Signed-off-by: Niels de Vos > Reviewed-on: https://review.gluster.org/16471 > Smoke: Gluster Build System > NetBSD-regression: NetBSD Build System > Reviewed-by: Xavier Hernandez > CentOS-regression: Gluster Build System > Reviewed-by: Kaleb KEITHLEY Backport note: This patch makes it easier to backport changes that use gf_refcount_t. There is no functional change. Change-Id: I32473b6d1799f62861d4b2d78ea30c09e6c80ab1 BUG: 1471870 Signed-off-by: Niels de Vos Reviewed-on: https://review.gluster.org/17913 Smoke: Gluster Build System CentOS-regression: Gluster Build System Reviewed-by: Shyamsundar Ranganathan --- rpc/rpc-transport/socket/src/socket.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'rpc') diff --git a/rpc/rpc-transport/socket/src/socket.c b/rpc/rpc-transport/socket/src/socket.c index 71eacf83f2a..8c62a25f67d 100644 --- a/rpc/rpc-transport/socket/src/socket.c +++ b/rpc/rpc-transport/socket/src/socket.c @@ -3961,11 +3961,9 @@ init_openssl_mt (void) SSL_load_error_strings(); } -void -socket_poller_mayday (void *data) +static void +socket_poller_mayday (socket_private_t *priv) { - socket_private_t *priv = (socket_private_t *)data; - if (priv == NULL) return; -- cgit