summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-quota.c
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2018-09-28 13:03:38 +0530
committerAmar Tumballi <amarts@redhat.com>2018-10-15 04:05:30 +0000
commit76cc1ea613e038ced4bc6ae26233cb0681b63be5 (patch)
treeecca8321697c25951dbe94bb4b7d182040d567ac /xlators/mgmt/glusterd/src/glusterd-quota.c
parentc962e2cbd73e78f31e690f7b1f8456616006c543 (diff)
libglusterfs/dict: Add sizeof()-1 variants of dict functions
One needs to be very careful about giving same key for the key and SLEN(key) arguments in dict_xxxn() functions. Writing macros that would take care of passing the SLEN(key) would help reduce this burden on the developer and reviewer. updates: bz#1193929 Change-Id: I312c479b919826570b47ae2c219c53e2f9b2ddef Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-quota.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-quota.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-quota.c b/xlators/mgmt/glusterd/src/glusterd-quota.c
index d2fefeff9f0..014d3d55b98 100644
--- a/xlators/mgmt/glusterd/src/glusterd-quota.c
+++ b/xlators/mgmt/glusterd/src/glusterd-quota.c
@@ -540,8 +540,7 @@ glusterd_quota_get_default_soft_limit(glusterd_volinfo_t *volinfo,
else
val = gf_strdup("80%");
- ret = dict_set_dynstrn(rsp_dict, "default-soft-limit",
- SLEN("default-soft-limit"), val);
+ ret = dict_set_dynstr_sizen(rsp_dict, "default-soft-limit", val);
if (ret) {
gf_msg(this->name, GF_LOG_ERROR, 0, GD_MSG_DICT_SET_FAILED,
"Failed to set default "