summaryrefslogtreecommitdiffstats
path: root/xlators/debug
diff options
context:
space:
mode:
authorRavishankar N <ravishankar@redhat.com>2016-08-10 11:24:19 +0530
committerPranith Kumar Karampuri <pkarampu@redhat.com>2016-08-12 01:53:23 -0700
commitdf6a127b4dbb96dd970d255635ccfeae17a38186 (patch)
tree8183e96cd197a6752abea0e1a132b8681d0f855d /xlators/debug
parent5ef32c57f327e1dd4e9d227b9c8fd4b6f6fb4970 (diff)
libglusterfs: move alloca0 definition to common-utils
...and remove their definitons from EC and AFR. Also `s/alloca+memset0/alloca0` wherever it is used. Change-Id: I3b71e596d12a7d8900f5d761af6b98305c8874d5 BUG: 1366226 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/15147 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Diffstat (limited to 'xlators/debug')
-rw-r--r--xlators/debug/io-stats/src/io-stats.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/xlators/debug/io-stats/src/io-stats.c b/xlators/debug/io-stats/src/io-stats.c
index d7684e16470..e2963b7c196 100644
--- a/xlators/debug/io-stats/src/io-stats.c
+++ b/xlators/debug/io-stats/src/io-stats.c
@@ -2855,8 +2855,7 @@ conditional_dump (dict_t *dict, char *key, data_t *value, void *data)
/* hmmm... no check for this */
/* name format: <passed in path/filename>.<xlator name slashes to -> */
namelen = value->len + strlen (this->name) + 2; /* '.' and '\0' */
- filename = alloca (namelen);
- memset (filename, 0, namelen);
+ filename = alloca0 (namelen);
memcpy (filename, data_to_str (value), value->len);
memcpy (filename + value->len, ".", 1);
memcpy (filename + value->len + 1, this->name, strlen(this->name));