summaryrefslogtreecommitdiffstats
path: root/rpc/rpc-lib/src
diff options
context:
space:
mode:
authorYaniv Kaul <ykaul@redhat.com>2018-08-21 23:34:52 +0300
committerAmar Tumballi <amarts@redhat.com>2018-08-23 09:29:02 +0000
commitcd95c072f4bc13c5c920aae359e8e9b84725ea2c (patch)
tree094d8f62843f42aa8643df6f41431ffe8be711ab /rpc/rpc-lib/src
parent4d3be307293b63c74398dfa715e9920cf356f083 (diff)
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>
Diffstat (limited to 'rpc/rpc-lib/src')
-rw-r--r--rpc/rpc-lib/src/rpc-clnt-ping.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/rpc/rpc-lib/src/rpc-clnt-ping.c b/rpc/rpc-lib/src/rpc-clnt-ping.c
index af4a993..2562989 100644
--- a/rpc/rpc-lib/src/rpc-clnt-ping.c
+++ b/rpc/rpc-lib/src/rpc-clnt-ping.c
@@ -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;