summaryrefslogtreecommitdiffstats
path: root/xlators/cluster
diff options
context:
space:
mode:
authorNiels de Vos <ndevos@redhat.com>2017-07-29 14:16:07 +0200
committerShyamsundar Ranganathan <srangana@redhat.com>2017-08-11 11:22:43 +0000
commitdc413d4126d02be71a014786e17e7b605443e887 (patch)
tree123dd8459dcb8100c53089443ef6574a6d7018a1 /xlators/cluster
parentcfa33b224f58053bbbcbc46865fca70621a59f05 (diff)
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 <ndevos@redhat.com> > Reviewed-on: https://review.gluster.org/16471 > Smoke: Gluster Build System <jenkins@build.gluster.org> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > Reviewed-by: Xavier Hernandez <xhernandez@datalab.es> > CentOS-regression: Gluster Build System <jenkins@build.gluster.org> > Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> 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 <ndevos@redhat.com> Reviewed-on: https://review.gluster.org/17913 Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
Diffstat (limited to 'xlators/cluster')
-rw-r--r--xlators/cluster/dht/src/dht-helper.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/xlators/cluster/dht/src/dht-helper.c b/xlators/cluster/dht/src/dht-helper.c
index c9bf60eb591..55f86075f5e 100644
--- a/xlators/cluster/dht/src/dht-helper.c
+++ b/xlators/cluster/dht/src/dht-helper.c
@@ -15,15 +15,10 @@
#include "dht-helper.h"
-void
-dht_free_fd_ctx (void *data)
+static void
+dht_free_fd_ctx (dht_fd_ctx_t *fd_ctx)
{
- dht_fd_ctx_t *fd_ctx = NULL;
-
- fd_ctx = (dht_fd_ctx_t *)data;
GF_FREE (fd_ctx);
-
- return;
}