diff options
author | Yaniv Kaul <ykaul@redhat.com> | 2019-08-28 19:38:01 +0300 |
---|---|---|
committer | Kotresh HR <khiremat@redhat.com> | 2019-09-05 08:57:12 +0000 |
commit | f6d6c0f65f7b512724694b3436358e1113cbfccb (patch) | |
tree | 7b04c3c1391bbbbb6bc87f9d0b94caff430ed089 /xlators/features | |
parent | ee24c0438ce40b0c6faf6581fd4eb162767d8a90 (diff) |
posix*.c: remove unneeded strlen() calls
In various places, we can re-use knowledge of string length
or result of snprintf() and such instead of strlen().
Change-Id: I4c9b1decf1169b3f8ac83699a0afbd7c38fad746
updates: bz#1193929
Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
Diffstat (limited to 'xlators/features')
-rw-r--r-- | xlators/features/locks/src/posix.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/features/locks/src/posix.c b/xlators/features/locks/src/posix.c index 47822b88bde..d2f5db5116b 100644 --- a/xlators/features/locks/src/posix.c +++ b/xlators/features/locks/src/posix.c @@ -418,7 +418,7 @@ pl_set_xdata_response(xlator_t *this, pl_local_t *local, inode_t *parent, if (!xdata || !local) return; - if (local->parent_entrylk_req && parent && name && strlen(name)) + if (local->parent_entrylk_req && parent && name && name[0] != '\0') pl_parent_entrylk_xattr_fill(this, parent, name, xdata, max_lock); if (!inode) |