summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--api/src/glfs.c10
-rw-r--r--libglusterfs/src/refcount.h2
-rw-r--r--rpc/rpc-transport/socket/src/socket.c6
-rw-r--r--xlators/cluster/dht/src/dht-helper.c9
-rw-r--r--xlators/features/marker/src/marker-quota-helper.c6
-rw-r--r--xlators/features/marker/src/marker-quota-helper.h3
6 files changed, 10 insertions, 26 deletions
diff --git a/api/src/glfs.c b/api/src/glfs.c
index 94a12c0be31..a1c8f6f54cb 100644
--- a/api/src/glfs.c
+++ b/api/src/glfs.c
@@ -583,16 +583,12 @@ pub_glfs_from_glfd (struct glfs_fd *glfd)
GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_from_glfd, 3.4.0);
-void
-glfs_fd_destroy (void *data)
+static void
+glfs_fd_destroy (struct glfs_fd *glfd)
{
- struct glfs_fd *glfd = NULL;
-
- if (!data)
+ if (!glfd)
return;
- glfd = (struct glfs_fd *)data;
-
glfs_lock (glfd->fs, _gf_true);
{
list_del_init (&glfd->openfds);
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
*
diff --git a/rpc/rpc-transport/socket/src/socket.c b/rpc/rpc-transport/socket/src/socket.c
index e214c772aa6..b8815773f41 100644
--- a/rpc/rpc-transport/socket/src/socket.c
+++ b/rpc/rpc-transport/socket/src/socket.c
@@ -3841,11 +3841,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;
diff --git a/xlators/cluster/dht/src/dht-helper.c b/xlators/cluster/dht/src/dht-helper.c
index 002e92b68d7..0a2abfb697b 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;
}
diff --git a/xlators/features/marker/src/marker-quota-helper.c b/xlators/features/marker/src/marker-quota-helper.c
index 1fed9df6d6a..e3e218f8af5 100644
--- a/xlators/features/marker/src/marker-quota-helper.c
+++ b/xlators/features/marker/src/marker-quota-helper.c
@@ -146,11 +146,9 @@ out:
return ctx;
}
-void
-mq_contri_fini (void *data)
+static void
+mq_contri_fini (inode_contribution_t *contri)
{
- inode_contribution_t *contri = data;
-
LOCK_DESTROY (&contri->lock);
GF_FREE (contri);
}
diff --git a/xlators/features/marker/src/marker-quota-helper.h b/xlators/features/marker/src/marker-quota-helper.h
index bf417aa8241..444ba7ca71e 100644
--- a/xlators/features/marker/src/marker-quota-helper.h
+++ b/xlators/features/marker/src/marker-quota-helper.h
@@ -66,9 +66,6 @@ mq_local_ref (quota_local_t *);
int32_t
mq_local_unref (xlator_t *, quota_local_t *);
-void
-mq_contri_fini (void *data);
-
inode_contribution_t*
mq_contri_init (inode_t *inode);