From df6a127b4dbb96dd970d255635ccfeae17a38186 Mon Sep 17 00:00:00 2001 From: Ravishankar N Date: Wed, 10 Aug 2016 11:24:19 +0530 Subject: 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 Reviewed-on: http://review.gluster.org/15147 Smoke: Gluster Build System NetBSD-regression: NetBSD Build System Reviewed-by: Pranith Kumar Karampuri CentOS-regression: Gluster Build System --- xlators/debug/io-stats/src/io-stats.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'xlators/debug/io-stats') 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: . */ 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)); -- cgit