rpc/rpc-lib/src/rpc-clnt-ping.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: Ifb30412ddf1bfa509f52e0454454929b266e5658 updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
This commit is contained in:
parent
4d3be30729
commit
cd95c072f4
@ -266,7 +266,7 @@ rpc_clnt_ping (struct rpc_clnt *rpc)
|
||||
struct ping_local *local = NULL;
|
||||
|
||||
conn = &rpc->conn;
|
||||
local = GF_CALLOC (1, sizeof(struct ping_local),
|
||||
local = GF_MALLOC (sizeof(struct ping_local),
|
||||
gf_common_ping_local_t);
|
||||
if (!local)
|
||||
return ret;
|
||||
|
Loading…
x
Reference in New Issue
Block a user