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.h | |
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.h')
-rw-r--r-- | xlators/features/quota/src/quota.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/xlators/features/quota/src/quota.h b/xlators/features/quota/src/quota.h index f0a5d4ed279..8bcc3ec6176 100644 --- a/xlators/features/quota/src/quota.h +++ b/xlators/features/quota/src/quota.h @@ -47,8 +47,7 @@ #define QUOTA_WIND_FOR_INTERNAL_FOP(xdata, label) \ do { \ - if (xdata && dict_getn(xdata, GLUSTERFS_INTERNAL_FOP_KEY, \ - SLEN(GLUSTERFS_INTERNAL_FOP_KEY))) \ + if (xdata && dict_get_sizen(xdata, GLUSTERFS_INTERNAL_FOP_KEY)) \ goto label; \ } while (0) |