summaryrefslogtreecommitdiffstats
path: root/xlators/cluster
diff options
context:
space:
mode:
authorYaniv Kaul <ykaul@redhat.com>2018-08-21 23:36:51 +0300
committerAmar Tumballi <amarts@redhat.com>2018-09-10 05:15:49 +0000
commit7593e05ad38aa63ee7fd6d1c8be815d00874ae2d (patch)
tree137b6a1ff0b6518d1ec7b4a87cb0d467eecbf14b /xlators/cluster
parent42bc6ef4c70eda1d8d6011d52399b778f0f2b70f (diff)
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 <ykaul@redhat.com>
Diffstat (limited to 'xlators/cluster')
-rw-r--r--xlators/cluster/dht/src/tier-common.c2
1 files changed, 1 insertions, 1 deletions
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;