diff options
author | Amar Tumballi <amarts@redhat.com> | 2018-01-05 13:51:18 +0530 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2018-01-17 00:00:11 +0000 |
commit | 9404b0de3fd8ab5adc3a531d4cb37b56e1e3908f (patch) | |
tree | b01d08009acb12182f411a4d0edb5b70b15a5cd4 /xlators/features/changelog | |
parent | 7ba7a4b27d124f4ee16fe4776a4670cd5b0160c4 (diff) |
core: fix some of the dict_{get,set} with proper APIs
updates #220
Change-Id: I6e25dbb69b2c7021e00073e8f025d212db7de0be
Signed-off-by: Amar Tumballi <amarts@redhat.com>
Diffstat (limited to 'xlators/features/changelog')
-rw-r--r-- | xlators/features/changelog/src/changelog.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/xlators/features/changelog/src/changelog.c b/xlators/features/changelog/src/changelog.c index caea8a59477..10a149232c2 100644 --- a/xlators/features/changelog/src/changelog.c +++ b/xlators/features/changelog/src/changelog.c @@ -627,7 +627,6 @@ changelog_mkdir (call_frame_t *frame, xlator_t *this, { int ret = -1; uuid_t gfid = {0,}; - void *uuid_req = NULL; size_t xtra_len = 0; changelog_priv_t *priv = NULL; changelog_opt_t *co = NULL; @@ -638,13 +637,12 @@ changelog_mkdir (call_frame_t *frame, xlator_t *this, priv = this->private; CHANGELOG_NOT_ACTIVE_THEN_GOTO (frame, priv, wind); - ret = dict_get_ptr (xdata, "gfid-req", &uuid_req); + ret = dict_get_gfuuid (xdata, "gfid-req", &gfid); if (ret) { gf_msg_debug (this->name, 0, "failed to get gfid from dict"); goto wind; } - gf_uuid_copy (gfid, uuid_req); CHANGELOG_INIT_NOCHECK (this, frame->local, NULL, gfid, 5); @@ -767,7 +765,6 @@ changelog_symlink (call_frame_t *frame, xlator_t *this, int ret = -1; size_t xtra_len = 0; uuid_t gfid = {0,}; - void *uuid_req = NULL; changelog_priv_t *priv = NULL; changelog_opt_t *co = NULL; call_stub_t *stub = NULL; @@ -777,13 +774,12 @@ changelog_symlink (call_frame_t *frame, xlator_t *this, priv = this->private; CHANGELOG_NOT_ACTIVE_THEN_GOTO (frame, priv, wind); - ret = dict_get_ptr (xdata, "gfid-req", &uuid_req); + ret = dict_get_gfuuid (xdata, "gfid-req", &gfid); if (ret) { gf_msg_debug (this->name, 0, "failed to get gfid from dict"); goto wind; } - gf_uuid_copy (gfid, uuid_req); CHANGELOG_INIT_NOCHECK (this, frame->local, NULL, gfid, 2); @@ -896,7 +892,6 @@ changelog_mknod (call_frame_t *frame, { int ret = -1; uuid_t gfid = {0,}; - void *uuid_req = NULL; size_t xtra_len = 0; changelog_priv_t *priv = NULL; changelog_opt_t *co = NULL; @@ -924,13 +919,12 @@ changelog_mknod (call_frame_t *frame, goto wind; } - ret = dict_get_ptr (xdata, "gfid-req", &uuid_req); + ret = dict_get_gfuuid (xdata, "gfid-req", &gfid); if (ret) { gf_msg_debug (this->name, 0, "failed to get gfid from dict"); goto wind; } - gf_uuid_copy (gfid, uuid_req); CHANGELOG_INIT_NOCHECK (this, frame->local, NULL, gfid, 5); @@ -1071,7 +1065,6 @@ changelog_create (call_frame_t *frame, xlator_t *this, { int ret = -1; uuid_t gfid = {0,}; - void *uuid_req = NULL; changelog_opt_t *co = NULL; changelog_priv_t *priv = NULL; size_t xtra_len = 0; @@ -1082,13 +1075,12 @@ changelog_create (call_frame_t *frame, xlator_t *this, priv = this->private; CHANGELOG_NOT_ACTIVE_THEN_GOTO (frame, priv, wind); - ret = dict_get_ptr (xdata, "gfid-req", &uuid_req); + ret = dict_get_gfuuid (xdata, "gfid-req", &gfid); if (ret) { gf_msg_debug (this->name, 0, "failed to get gfid from dict"); goto wind; } - gf_uuid_copy (gfid, uuid_req); /* init with two extra records */ CHANGELOG_INIT_NOCHECK (this, frame->local, NULL, gfid, 5); |