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 --- cli/src/cli-rpc-ops.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'cli/src/cli-rpc-ops.c') diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c index fea74667e05..4c952b5ccb7 100644 --- a/cli/src/cli-rpc-ops.c +++ b/cli/src/cli-rpc-ops.c @@ -3812,9 +3812,11 @@ print_quota_list_from_quotad(call_frame_t *frame, dict_t *rsp_dict) limits.sl = ntoh64(size_limits->sl); if (type == GF_QUOTA_OPTION_TYPE_LIST) - ret = quota_dict_get_meta(rsp_dict, QUOTA_SIZE_KEY, &used_space); + ret = quota_dict_get_meta(rsp_dict, QUOTA_SIZE_KEY, + SLEN(QUOTA_SIZE_KEY), &used_space); else - ret = quota_dict_get_inode_meta(rsp_dict, QUOTA_SIZE_KEY, &used_space); + ret = quota_dict_get_inode_meta(rsp_dict, QUOTA_SIZE_KEY, + SLEN(QUOTA_SIZE_KEY), &used_space); if (ret < 0) { gf_log("cli", GF_LOG_WARNING, "size key not present in dict"); -- cgit