[Bugs] [Bug 1193929] GlusterFS can be improved
bugzilla at redhat.com
bugzilla at redhat.com
Wed Aug 22 13:31:14 UTC 2018
https://bugzilla.redhat.com/show_bug.cgi?id=1193929
--- Comment #212 from Worker Ant <bugzilla-bot at gluster.org> ---
COMMIT: https://review.gluster.org/20824 committed in master by "Niels de Vos"
<ndevos at redhat.com> with a commit message- libglusterfs/src/client_t.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 at redhat.com>
Change-Id: I58d2604ef684f94ea782fdbb1b1462fc7be53a9e
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
More information about the Bugs
mailing list