From 7593e05ad38aa63ee7fd6d1c8be815d00874ae2d Mon Sep 17 00:00:00 2001 From: Yaniv Kaul Date: Tue, 21 Aug 2018 23:36:51 +0300 Subject: xlators/cluster/dht/src/tier-common.c:move to GF_MALLOC() instead of GF_CALLOC() when It doesn't make sense to calloc (allocate and clear) memory when the code right away fills that memory with data. It may be optimized by the compiler, or have a microscopic performance improvement. Please review carefully, especially for string allocation, with the terminating NULL string. Only compile-tested! Change-Id: I7d38a7d576f6777976fe86e5351a8d95caddbb9c updates: bz#1193929 Signed-off-by: Yaniv Kaul --- xlators/cluster/dht/src/tier-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xlators') diff --git a/xlators/cluster/dht/src/tier-common.c b/xlators/cluster/dht/src/tier-common.c index c6b54d21d8e..f08ff4768f0 100644 --- a/xlators/cluster/dht/src/tier-common.c +++ b/xlators/cluster/dht/src/tier-common.c @@ -340,7 +340,7 @@ tier_create_linkfile_create_cbk (call_frame_t *frame, void *cookie, } } - gfid = GF_CALLOC (1, sizeof (uuid_t), gf_common_mt_char); + gfid = GF_MALLOC (sizeof (uuid_t), gf_common_mt_char); if (!gfid) { local->op_errno = ENOMEM; op_errno = ENOMEM; -- cgit