summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/run.h
diff options
context:
space:
mode:
authorYaniv Kaul <ykaul@redhat.com>2018-08-08 21:42:45 +0300
committerSanju Rakonde <srakonde@redhat.com>2018-09-05 21:12:08 +0530
commit2b95d2c0be20a62279bbfebc17457004aca0988f (patch)
treedd9c87c904e7f4a3681385176dc26fe5e5b6ebcd /libglusterfs/src/run.h
parent3ee5f7ee34e1768a0b15c6acc54481c2372f9c92 (diff)
cli/src/cli-cmd-parser.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: Ic1531afbf614823628cc8d70bae782d4db7ec033
Diffstat (limited to 'libglusterfs/src/run.h')
0 files changed, 0 insertions, 0 deletions