summaryrefslogtreecommitdiffstats
path: root/rpc/rpc-transport/socket/src/name.c
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2010-07-27 11:12:51 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-07-28 03:34:44 -0700
commit0aae2c46579421b871919e93619273d9a9bc79fb (patch)
treec9b7405a80f509d5a5da2cf4882144cabf5b93c7 /rpc/rpc-transport/socket/src/name.c
parentb2b6281e3487d3d797ab7974df69790a28c443c9 (diff)
fix all the clang errors in 'rpc/*'
Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1133 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1133
Diffstat (limited to 'rpc/rpc-transport/socket/src/name.c')
-rw-r--r--rpc/rpc-transport/socket/src/name.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/rpc/rpc-transport/socket/src/name.c b/rpc/rpc-transport/socket/src/name.c
index 763fa3dd09b..e5b9199aa35 100644
--- a/rpc/rpc-transport/socket/src/name.c
+++ b/rpc/rpc-transport/socket/src/name.c
@@ -605,21 +605,23 @@ int32_t
fill_inet6_inet_identifiers (rpc_transport_t *this, struct sockaddr_storage *addr,
int32_t addr_len, char *identifier)
{
- int32_t ret = 0, tmpaddr_len = 0;
- char service[NI_MAXSERV], host[NI_MAXHOST];
struct sockaddr_storage tmpaddr;
+ char service[NI_MAXSERV] = {0,};
+ char host[NI_MAXHOST] = {0,};
+ int32_t ret = 0;
+ int32_t tmpaddr_len = 0;
+ int32_t one_to_four = 0;
+ int32_t four_to_eight = 0;
+ int32_t twelve_to_sixteen = 0;
+ int16_t eight_to_ten = 0;
+ int16_t ten_to_twelve = 0;
+
memset (&tmpaddr, 0, sizeof (tmpaddr));
tmpaddr = *addr;
tmpaddr_len = addr_len;
if (((struct sockaddr *) &tmpaddr)->sa_family == AF_INET6) {
- int32_t one_to_four, four_to_eight, twelve_to_sixteen;
- int16_t eight_to_ten, ten_to_twelve;
-
- one_to_four = four_to_eight = twelve_to_sixteen = 0;
- eight_to_ten = ten_to_twelve = 0;
-
one_to_four = ((struct sockaddr_in6 *) &tmpaddr)->sin6_addr.s6_addr32[0];
four_to_eight = ((struct sockaddr_in6 *) &tmpaddr)->sin6_addr.s6_addr32[1];
#ifdef GF_SOLARIS_HOST_OS