diff options
author | Yaniv Kaul <ykaul@redhat.com> | 2018-08-08 21:41:21 +0300 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2018-09-07 03:40:47 +0000 |
commit | 50e8b0c335ba4f18987a32e8268ee31498323beb (patch) | |
tree | d9f46df1e5b722debe2708ae10efbb701dade848 /xlators/cluster/ec/src/ec-gf8.h | |
parent | ce17a3a66dd15f09d1bf5404f7f3dee860ca6f8c (diff) |
glusterfsd/src/glusterfsd.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: Iaed86fcc909022c5158c3e08a9106b1110b9df0a
Diffstat (limited to 'xlators/cluster/ec/src/ec-gf8.h')
0 files changed, 0 insertions, 0 deletions