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.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.h')
-rw-r--r-- | xlators/storage/posix/src/posix.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/storage/posix/src/posix.h b/xlators/storage/posix/src/posix.h index 9c04c55db02..9d670625d94 100644 --- a/xlators/storage/posix/src/posix.h +++ b/xlators/storage/posix/src/posix.h @@ -296,7 +296,7 @@ typedef struct { char gfid_str[64] = {0}; \ uuid_utoa_r(gfid, gfid_str); \ path_len = strlen(base_path) + 1 + SLEN(GF_UNLINK_PATH) + 1 + \ - strlen(gfid_str) + 1; \ + UUID_CANONICAL_FORM_LEN + 1; \ unlink_path = alloca(path_len); \ if (!unlink_path) { \ gf_msg("posix", GF_LOG_ERROR, ENOMEM, P_MSG_UNLINK_FAILED, \ |