From 94cac2562ff32104d2cd6325396e55cae16ec743 Mon Sep 17 00:00:00 2001 From: Yaniv Kaul Date: Thu, 16 Aug 2018 14:19:03 +0300 Subject: 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 --- xlators/mgmt/glusterd/src/glusterd-rpc-ops.c | 4 ++-- 1 file 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); -- cgit