From 341ba81448e869ae388b4b37556e47f6bf7413a5 Mon Sep 17 00:00:00 2001 From: Yaniv Kaul Date: Sun, 23 Sep 2018 11:04:22 +0300 Subject: Quota related files: use dict_{setn|getn|deln|get_int32n|set_int32n|set_strn} In a previous patch (https://review.gluster.org/20769) we've added the key length to be passed to dict_* funcs, to remove the need to strlen() it. This patch moves some code to use it. Please review carefully. Compile-tested only! updates: bz#1193929 Signed-off-by: Yaniv Kaul Change-Id: If4f425a9827be7c36ccfbb9761006ae824a818c6 --- xlators/features/marker/src/marker.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'xlators/features/marker/src/marker.c') diff --git a/xlators/features/marker/src/marker.c b/xlators/features/marker/src/marker.c index 29294e73fd4..2d3177c7ec3 100644 --- a/xlators/features/marker/src/marker.c +++ b/xlators/features/marker/src/marker.c @@ -1521,7 +1521,7 @@ marker_do_rename(call_frame_t *frame, void *cookie, xlator_t *this, char contri_key[QUOTA_KEY_MAX] = { 0, }; - int32_t ret = 0; + int keylen = 0; quota_meta_t contribution = { 0, }; @@ -1543,12 +1543,12 @@ marker_do_rename(call_frame_t *frame, void *cookie, xlator_t *this, goto err; } - GET_CONTRI_KEY(this, contri_key, oplocal->loc.parent->gfid, ret); - if (ret < 0) { + GET_CONTRI_KEY(this, contri_key, oplocal->loc.parent->gfid, keylen); + if (keylen < 0) { local->err = errno ? errno : ENOMEM; goto err; } - quota_dict_get_meta(dict, contri_key, &contribution); + quota_dict_get_meta(dict, contri_key, keylen, &contribution); oplocal->contribution = contribution; STACK_WIND(frame, marker_rename_cbk, FIRST_CHILD(this), -- cgit