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 --- xlators/cluster/stripe/src/stripe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xlators/cluster/stripe/src') diff --git a/xlators/cluster/stripe/src/stripe.c b/xlators/cluster/stripe/src/stripe.c index ae84757bb50..75851aa6c5d 100644 --- a/xlators/cluster/stripe/src/stripe.c +++ b/xlators/cluster/stripe/src/stripe.c @@ -5528,7 +5528,7 @@ stripe_getxattr (call_frame_t *frame, xlator_t *this, if (name && strncmp (name, QUOTA_SIZE_KEY, - strlen (QUOTA_SIZE_KEY)) == 0) { + SLEN (QUOTA_SIZE_KEY)) == 0) { local->wind_count = priv->child_count; for (i = 0, trav=this->children; i < priv->child_count; i++, @@ -5596,7 +5596,7 @@ stripe_is_special_xattr (const char *name) } if (!strncmp (name, GF_XATTR_LOCKINFO_KEY, - strlen (GF_XATTR_LOCKINFO_KEY)) + SLEN (GF_XATTR_LOCKINFO_KEY)) || XATTR_IS_PATHINFO (name)) is_spl = _gf_true; out: -- cgit