aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorAlex Elder <elder@dreamhost.com>2012-01-23 16:49:27 -0500
committerAlex Elder <elder@dreamhost.com>2012-03-22 11:47:45 -0400
commit99f0f3b2c4be15784bb4ede33b5f2c3f7861dba7 (patch)
tree356e82e59845aeb418f7975a4f8be1fb34de717e /net
parentbd406145129e8724cc71b65ff2a788dbd4d60c50 (diff)
ceph: eliminate some abusive casts
This fixes some spots where a type cast to (void *) was used as as a universal type hiding mechanism. Instead, properly cast the type to the intended target type. Signed-off-by: Alex Elder <elder@newdream.net> Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'net')
-rw-r--r--net/ceph/messenger.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c
index 09a412ba4b70..3917847ad8e5 100644
--- a/net/ceph/messenger.c
+++ b/net/ceph/messenger.c
@@ -62,8 +62,8 @@ const char *ceph_pr_addr(const struct sockaddr_storage *ss)
62{ 62{
63 int i; 63 int i;
64 char *s; 64 char *s;
65 struct sockaddr_in *in4 = (void *)ss; 65 struct sockaddr_in *in4 = (struct sockaddr_in *) ss;
66 struct sockaddr_in6 *in6 = (void *)ss; 66 struct sockaddr_in6 *in6 = (struct sockaddr_in6 *) ss;
67 67
68 i = atomic_inc_return(&addr_str_seq) & ADDR_STR_COUNT_MASK; 68 i = atomic_inc_return(&addr_str_seq) & ADDR_STR_COUNT_MASK;
69 s = addr_str[i]; 69 s = addr_str[i];
@@ -1112,8 +1112,8 @@ static void addr_set_port(struct sockaddr_storage *ss, int p)
1112static int ceph_pton(const char *str, size_t len, struct sockaddr_storage *ss, 1112static int ceph_pton(const char *str, size_t len, struct sockaddr_storage *ss,
1113 char delim, const char **ipend) 1113 char delim, const char **ipend)
1114{ 1114{
1115 struct sockaddr_in *in4 = (void *)ss; 1115 struct sockaddr_in *in4 = (struct sockaddr_in *) ss;
1116 struct sockaddr_in6 *in6 = (void *)ss; 1116 struct sockaddr_in6 *in6 = (struct sockaddr_in6 *) ss;
1117 1117
1118 memset(ss, 0, sizeof(*ss)); 1118 memset(ss, 0, sizeof(*ss));
1119 1119