summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt
diff options
context:
space:
mode:
authorYaniv Kaul <ykaul@redhat.com>2018-08-16 14:19:03 +0300
committerAmar Tumballi <amarts@redhat.com>2018-08-23 06:09:57 +0000
commit94cac2562ff32104d2cd6325396e55cae16ec743 (patch)
treeb17132216684c2ec64fc064d27f3c87d2bc8cb06 /xlators/mgmt
parentbc61ee44a3f8a9bf0490605f62ec27fcd6a5b8d0 (diff)
xlators/mgmt/glusterd/src/glusterd-rpc-ops.c : re-scope message variable
The error and/or message variable was changed in scope: defined in a smaller scope. Compile-tested only! Change-Id: I5e46a1992ad35a996aa8ee58da28606ac018ab8e updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
Diffstat (limited to 'xlators/mgmt')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-rpc-ops.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c b/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c
index 62deb5906ee..fc859c00a9d 100644
--- a/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c
+++ b/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c
@@ -1167,7 +1167,6 @@ __glusterd_stage_op_cbk (struct rpc_req *req, struct iovec *iov,
glusterd_op_sm_event_type_t event_type = GD_OP_EVENT_NONE;
glusterd_peerinfo_t *peerinfo = NULL;
dict_t *dict = NULL;
- char err_str[2048] = {0};
char *peer_str = NULL;
xlator_t *this = NULL;
glusterd_conf_t *priv = NULL;
@@ -1259,6 +1258,7 @@ out:
peer_str = peerinfo->hostname;
else
peer_str = uuid_utoa (rsp.uuid);
+ char err_str[2048];
snprintf (err_str, sizeof (err_str),
OPERRSTR_STAGE_FAIL, peer_str);
opinfo.op_errstr = gf_strdup (err_str);
@@ -1315,7 +1315,6 @@ __glusterd_commit_op_cbk (struct rpc_req *req, struct iovec *iov,
glusterd_op_sm_event_type_t event_type = GD_OP_EVENT_NONE;
glusterd_peerinfo_t *peerinfo = NULL;
dict_t *dict = NULL;
- char err_str[2048] = {0};
char *peer_str = NULL;
xlator_t *this = NULL;
glusterd_conf_t *priv = NULL;
@@ -1417,6 +1416,7 @@ __glusterd_commit_op_cbk (struct rpc_req *req, struct iovec *iov,
peer_str = peerinfo->hostname;
else
peer_str = uuid_utoa (rsp.uuid);
+ char err_str[2048];
snprintf (err_str, sizeof (err_str),
OPERRSTR_COMMIT_FAIL, peer_str);
opinfo.op_errstr = gf_strdup (err_str);