From 8d171374cbbbdd88c8714198903b317bd132e1e2 Mon Sep 17 00:00:00 2001 From: Yaniv Kaul Date: Tue, 21 Aug 2018 19:18:17 +0300 Subject: multiple files: move from strlen() to sizeof() {glusterfsd|glusterfsd-mgmt|quota-common-utils|xlator|tier|stripe}.c tools/setgfid2path/src/main.c xlators/cluster/afr/src/afr-inode-read.c {glusterfs-acl|glusterfs}.h For const strings, just do compile time size calc instead of runtime. Compile-tested only! Change-Id: I303684b1ff29b05c10126fb1057f507e404ced07 updates: bz#1193929 Signed-off-by: Yaniv Kaul --- tools/setgfid2path/src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/setgfid2path/src/main.c b/tools/setgfid2path/src/main.c index 07d7a48b15d..dfa561f4f51 100644 --- a/tools/setgfid2path/src/main.c +++ b/tools/setgfid2path/src/main.c @@ -90,7 +90,7 @@ int main(int argc, char **argv) xxh64 ); - key_size = strlen(GFID2PATH_XATTR_KEY_PREFIX) + + key_size = SLEN (GFID2PATH_XATTR_KEY_PREFIX) + GF_XXH64_DIGEST_LENGTH*2+1; key = alloca (key_size); snprintf (key, key_size, GFID2PATH_XATTR_KEY_PREFIX"%s", xxh64); -- cgit