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 --- glusterfsd/src/glusterfsd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'glusterfsd/src/glusterfsd.c') diff --git a/glusterfsd/src/glusterfsd.c b/glusterfsd/src/glusterfsd.c index 5497f592ea6..81a73344d6b 100644 --- a/glusterfsd/src/glusterfsd.c +++ b/glusterfsd/src/glusterfsd.c @@ -2143,7 +2143,7 @@ parse_cmdline (int argc, char *argv[], glusterfs_ctx_t *ctx) } if (cmd_args->thin_client) { - len = strlen (cmd_args->volfile_id) + strlen ("gfproxy-client/"); + len = strlen (cmd_args->volfile_id) + SLEN ("gfproxy-client/"); thin_volfileid = GF_CALLOC (1, len + 1, gf_common_mt_char); snprintf (thin_volfileid, len + 1, "gfproxy-client/%s", cmd_args->volfile_id); -- cgit