From f2ca301bd741e3e3f076cd3f72fcd377bcef2a1a Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Thu, 26 Jan 2017 16:45:51 +0100 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. 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 --- libglusterfs/src/refcount.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libglusterfs/src/refcount.h') diff --git a/libglusterfs/src/refcount.h b/libglusterfs/src/refcount.h index db9432acbbc..583b75cf8c2 100644 --- a/libglusterfs/src/refcount.h +++ b/libglusterfs/src/refcount.h @@ -84,7 +84,7 @@ _gf_ref_init (gf_ref_t *ref, gf_ref_release_t release, void *data); * * Sets the refcount to 1. */ -#define GF_REF_INIT(p, d) _gf_ref_init (&(p)->_ref, d, p) +#define GF_REF_INIT(p, d) _gf_ref_init (&(p)->_ref, (gf_ref_release_t) d, p) /* GF_REF_GET -- increase the refcount of a GF_REF_DECL structure * -- cgit