From c261eb6c1fa41b6a0eadabbb3a2f64dc194ec254 Mon Sep 17 00:00:00 2001 From: Vijay Bellur Date: Wed, 27 Feb 2019 16:02:43 -0800 Subject: Replace memdup() with gf_memdup() memdup() and gf_memdup() have the same implementation. Removed one API as the presence of both can be confusing. Change-Id: I562130c668457e13e4288e592792872d2e49887e updates: bz#1193929 Signed-off-by: Vijay Bellur --- xlators/protocol/client/src/client-helpers.c | 2 +- xlators/protocol/server/src/server-handshake.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'xlators/protocol') diff --git a/xlators/protocol/client/src/client-helpers.c b/xlators/protocol/client/src/client-helpers.c index 53b4484ecc8..42b5410ba07 100644 --- a/xlators/protocol/client/src/client-helpers.c +++ b/xlators/protocol/client/src/client-helpers.c @@ -209,7 +209,7 @@ unserialize_rsp_direntp(xlator_t *this, fd_t *fd, struct gfs3_readdirp_rsp *rsp, if (trav->dict.dict_val) { /* Dictionary is sent along with response */ - buf = memdup(trav->dict.dict_val, trav->dict.dict_len); + buf = gf_memdup(trav->dict.dict_val, trav->dict.dict_len); if (!buf) goto out; diff --git a/xlators/protocol/server/src/server-handshake.c b/xlators/protocol/server/src/server-handshake.c index 382f2410ee8..a0ff16349b3 100644 --- a/xlators/protocol/server/src/server-handshake.c +++ b/xlators/protocol/server/src/server-handshake.c @@ -36,7 +36,6 @@ gf_compare_client_version(rpcsvc_request_t *req, int fop_prognum, return ret; } - int server_getspec(rpcsvc_request_t *req) { @@ -267,7 +266,7 @@ server_setvolume(rpcsvc_request_t *req) */ config_params = dict_copy_with_ref(this->options, NULL); - buf = memdup(args.dict.dict_val, args.dict.dict_len); + buf = gf_memdup(args.dict.dict_val, args.dict.dict_len); if (buf == NULL) { op_ret = -1; op_errno = ENOMEM; -- cgit