diff options
author | Ravishankar N <ravishankar@redhat.com> | 2016-08-10 11:24:19 +0530 |
---|---|---|
committer | Pranith Kumar Karampuri <pkarampu@redhat.com> | 2016-08-12 01:53:23 -0700 |
commit | df6a127b4dbb96dd970d255635ccfeae17a38186 (patch) | |
tree | 8183e96cd197a6752abea0e1a132b8681d0f855d /libglusterfs | |
parent | 5ef32c57f327e1dd4e9d227b9c8fd4b6f6fb4970 (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 'libglusterfs')
-rw-r--r-- | libglusterfs/src/common-utils.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libglusterfs/src/common-utils.h b/libglusterfs/src/common-utils.h index aacf2c5a32c..fa5d28d92b3 100644 --- a/libglusterfs/src/common-utils.h +++ b/libglusterfs/src/common-utils.h @@ -44,6 +44,8 @@ void trap (void); #define STRINGIFY(val) #val #define TOSTRING(val) STRINGIFY(val) +#define alloca0(size) ({void *__ptr; __ptr = alloca(size); memset(__ptr, 0, size); __ptr; }) + #define min(a,b) ((a)<(b)?(a):(b)) #define max(a,b) ((a)>(b)?(a):(b)) #define roof(a,b) ((((a)+(b)-1)/((b)?(b):1))*(b)) |