summaryrefslogtreecommitdiffstats
path: root/tools/setgfid2path/src/main.c
diff options
context:
space:
mode:
authorYaniv Kaul <ykaul@redhat.com>2018-08-21 19:18:17 +0300
committerAmar Tumballi <amarts@redhat.com>2018-08-29 06:09:10 +0000
commit8d171374cbbbdd88c8714198903b317bd132e1e2 (patch)
treeb10e6fd5ba8b79d41e79c2d22757a5d3e82576a4 /tools/setgfid2path/src/main.c
parent60ef38482cc8d61711ecc48159cf6c036b1522a8 (diff)
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 <ykaul@redhat.com>
Diffstat (limited to 'tools/setgfid2path/src/main.c')
-rw-r--r--tools/setgfid2path/src/main.c2
1 files changed, 1 insertions, 1 deletions
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);