summaryrefslogtreecommitdiffstats
path: root/rpc/rpc-transport/socket/src/socket.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/socket.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/socket.c')
-rw-r--r--rpc/rpc-transport/socket/src/socket.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/rpc/rpc-transport/socket/src/socket.c b/rpc/rpc-transport/socket/src/socket.c
index b40a93ee8..6406d4589 100644
--- a/rpc/rpc-transport/socket/src/socket.c
+++ b/rpc/rpc-transport/socket/src/socket.c
@@ -392,12 +392,9 @@ __socket_reset (rpc_transport_t *this)
struct ioq *
__socket_ioq_new (rpc_transport_t *this, rpc_transport_msg_t *msg)
{
- socket_private_t *priv = NULL;
struct ioq *entry = NULL;
int count = 0;
- priv = this->private;
-
/* TODO: use mem-pool */
entry = GF_CALLOC (1, sizeof (*entry), gf_common_mt_ioq);
if (!entry)
@@ -1553,7 +1550,11 @@ socket_server_event_handler (int fd, int idx, void *data,
ret = -1;
}
pthread_mutex_unlock (&new_priv->lock);
- ret = rpc_transport_notify (this, RPC_TRANSPORT_ACCEPT, new_trans);
+ if (ret == -1)
+ goto unlock;
+
+ ret = rpc_transport_notify (this, RPC_TRANSPORT_ACCEPT,
+ new_trans);
}
}
unlock:
@@ -2112,7 +2113,7 @@ int32_t
socket_getmyaddr (rpc_transport_t *this, char *myaddr, int addrlen,
struct sockaddr *sa, socklen_t salen)
{
- int32_t ret = -1;
+ int32_t ret = 0;
if ((this == NULL) || (sa == NULL)) {
goto out;