summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-statedump.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-statedump.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-statedump.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-statedump.c b/xlators/mgmt/glusterd/src/glusterd-statedump.c
index d0a97053485..02b6ddc9662 100644
--- a/xlators/mgmt/glusterd/src/glusterd-statedump.c
+++ b/xlators/mgmt/glusterd/src/glusterd-statedump.c
@@ -20,10 +20,10 @@ static void
glusterd_dump_peer (glusterd_peerinfo_t *peerinfo, char *input_key, int index,
gf_boolean_t xpeers)
{
- char subkey[50] = {0,};
- char key[GF_DUMP_MAX_BUF_LEN] = {0,};
+ char subkey[144] = {0,};
+ char key[128] = {0,};
- strncpy (key, input_key, (GF_DUMP_MAX_BUF_LEN - 1));
+ strncpy (key, input_key, sizeof(key) - 1);
snprintf (subkey, sizeof (subkey), "%s%d", key, index);
@@ -64,10 +64,10 @@ glusterd_dump_peer_rpcstat (glusterd_peerinfo_t *peerinfo, char *input_key,
int ret = -1;
rpc_clnt_t *rpc = NULL;
char rpcsvc_peername[RPCSVC_PEER_STRLEN] = {0,};
- char subkey[50] = {0,};
- char key[GF_DUMP_MAX_BUF_LEN] = {0,};
+ char subkey[144] = {0,};
+ char key[128] = {0,};
- strncpy (key, input_key, (GF_DUMP_MAX_BUF_LEN - 1));
+ strncpy (key, input_key, sizeof(key) - 1);
/* Dump the rpc connection statistics */
rpc = peerinfo->rpc;