diff options
author | Pranith Kumar K <pkarampu@redhat.com> | 2018-09-28 13:03:38 +0530 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2018-10-15 04:05:30 +0000 |
commit | 76cc1ea613e038ced4bc6ae26233cb0681b63be5 (patch) | |
tree | ecca8321697c25951dbe94bb4b7d182040d567ac /xlators/features/quota/src/quota.c | |
parent | c962e2cbd73e78f31e690f7b1f8456616006c543 (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/features/quota/src/quota.c')
-rw-r--r-- | xlators/features/quota/src/quota.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/xlators/features/quota/src/quota.c b/xlators/features/quota/src/quota.c index 8015e8aae8b..6310967fc0d 100644 --- a/xlators/features/quota/src/quota.c +++ b/xlators/features/quota/src/quota.c @@ -3967,8 +3967,7 @@ quota_setxattr(call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *dict, VALIDATE_OR_GOTO(this, err); VALIDATE_OR_GOTO(loc, err); - if (xdata && dict_getn(xdata, GLUSTERFS_INTERNAL_FOP_KEY, - SLEN(GLUSTERFS_INTERNAL_FOP_KEY))) + if (xdata && dict_get_sizen(xdata, GLUSTERFS_INTERNAL_FOP_KEY)) internal_fop = _gf_true; if (frame->root->pid >= 0 && internal_fop == _gf_false) { |