summaryrefslogtreecommitdiffstats
path: root/xlators/playground
diff options
context:
space:
mode:
authorYaniv Kaul <ykaul@redhat.com>2018-08-08 21:40:29 +0300
committerNiels de Vos <ndevos@redhat.com>2018-08-22 15:17:49 +0000
commitbfba1d3602b20895956767c668e86390f16cb782 (patch)
tree24d4d9328b26c4c127fff6be8c779e78d69e5a88 /xlators/playground
parent443aa8e582f0dd5c4df916c0240eee3c0b56fe3f (diff)
libglusterfs/src/graph.c: Move to GF_MALLOC() instead of GF_CALLOC() when possible
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. In some cases, also changed allocation size to be sizeof some struct or type instead of a pointer - easier to read. In some cases, removed redundant strlen() calls by saving the result into a variable. 1. Only done for the straightforward cases. There's room for improvement. 2. Please review carefully, especially for string allocation, with the terminating NULL string. Only compile-tested! updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com> Change-Id: Icd990423a5e6048e76922668aab67422f4bc1867
Diffstat (limited to 'xlators/playground')
0 files changed, 0 insertions, 0 deletions