summaryrefslogtreecommitdiffstats
path: root/cli
diff options
context:
space:
mode:
authorPrasanna Kumar Kalever <prasanna.kalever@redhat.com>2017-02-08 13:19:01 +0530
committerPrasanna Kumar Kalever <prasanna.kalever@redhat.com>2017-02-08 14:05:28 +0530
commit6702716292058a507ff41df2880cc12154accced (patch)
tree36cc20cb0c0e1611d79889f139cb696e5e6cb0cd /cli
parent67fb77e759d6babaf5d8853b68241150bf10b6f7 (diff)
build: fix minor warnings
mostly uninitialized use of variables. check return values from function calls. Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
Diffstat (limited to 'cli')
-rw-r--r--cli/gluster-block.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/cli/gluster-block.c b/cli/gluster-block.c
index 0605ef7..e5b5efe 100644
--- a/cli/gluster-block.c
+++ b/cli/gluster-block.c
@@ -23,13 +23,13 @@ typedef enum clioperations {
static int
-glusterBlockCliRPC_1(void *cobj, operations opt, char **out)
+glusterBlockCliRPC_1(void *cobj, clioperations opt, char **out)
{
CLIENT *clnt = NULL;
int ret = -1;
int sockfd;
struct sockaddr_un saun;
- blockResponse *reply;
+ blockResponse *reply = NULL;
if ((sockfd = socket(AF_UNIX, SOCK_STREAM, 0)) < 0) {
@@ -86,9 +86,11 @@ glusterBlockCliRPC_1(void *cobj, operations opt, char **out)
break;
}
- if (GB_STRDUP(*out, reply->out) < 0)
- goto out;
- ret = reply->exit;
+ if (reply) {
+ if (GB_STRDUP(*out, reply->out) < 0)
+ goto out;
+ ret = reply->exit;
+ }
out:
if (clnt) {