diff options
author | Yaniv Kaul <ykaul@redhat.com> | 2019-10-20 09:12:20 +0300 |
---|---|---|
committer | Amar Tumballi <amarts@gmail.com> | 2019-11-06 16:31:42 +0000 |
commit | b17a65dc2e3b4eca0ddd3caf46120f35ed4574b2 (patch) | |
tree | 2496f65e749a12b2099b8597b2f88d8c1907addc /xlators/storage/posix/src/posix-gfid-path.c | |
parent | 6c08e5b0ed2bfdd46064187ba39a30c91913fcd7 (diff) |
posix-helpers.c (and others): minor changes to posix_xattr_fill()
posix_xattr_fill() is called from several POSIX functions.
Made minor changes to it and the functions called from it:
1. Dict functions to use known lengths (dict_getn() instead of dict_get(), etc.)
2. Re-ordered some static char[] arrays, to account (hopefully)
to the frequency of the xattrs usage (based on grep in the code...)
3. Before strcmp(), check if the strings lengths match.
4. Removed some dead code.
Hopefully, no functional changes.
Change-Id: I510c0d2785e54ffe0f82c4c449782f2302d63a32
updates: bz#1193929
Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
Diffstat (limited to 'xlators/storage/posix/src/posix-gfid-path.c')
-rw-r--r-- | xlators/storage/posix/src/posix-gfid-path.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/xlators/storage/posix/src/posix-gfid-path.c b/xlators/storage/posix/src/posix-gfid-path.c index 37b68c25d8d..b5e141ebfd0 100644 --- a/xlators/storage/posix/src/posix-gfid-path.c +++ b/xlators/storage/posix/src/posix-gfid-path.c @@ -99,11 +99,10 @@ gf_boolean_t posix_is_gfid2path_xattr(const char *name) { if (name && strncmp(GFID2PATH_XATTR_KEY_PREFIX, name, - GFID2PATH_XATTR_KEY_PREFIX_LENGTH) == 0) { + GFID2PATH_XATTR_KEY_PREFIX_LENGTH) == 0) return _gf_true; - } else { - return _gf_false; - } + + return _gf_false; } static int gf_posix_xattr_enotsup_log; |