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/storage/posix/src/posix-handle.h | |
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/storage/posix/src/posix-handle.h')
-rw-r--r-- | xlators/storage/posix/src/posix-handle.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/storage/posix/src/posix-handle.h b/xlators/storage/posix/src/posix-handle.h index c4d7cb14503..3e9020c0f8a 100644 --- a/xlators/storage/posix/src/posix-handle.h +++ b/xlators/storage/posix/src/posix-handle.h @@ -18,7 +18,7 @@ #define MAKE_PGFID_XATTR_KEY(var, prefix, pgfid) \ do { \ - var = alloca(strlen(prefix) + UUID_CANONICAL_FORM_LEN + 1); \ + var = alloca(SLEN(prefix) + UUID_CANONICAL_FORM_LEN + 1); \ strcpy(var, prefix); \ strcat(var, uuid_utoa(pgfid)); \ } while (0) |