summaryrefslogtreecommitdiffstats
path: root/xlators/performance/nl-cache/src
diff options
context:
space:
mode:
authorYaniv Kaul <ykaul@redhat.com>2018-08-21 20:32:01 +0300
committerAmar Tumballi <amarts@redhat.com>2018-08-31 06:13:54 +0000
commit058d215174b93b3aa14be99073979f45642e519e (patch)
treec0e1d2a040d549058eee88c09737f178e1fd893d /xlators/performance/nl-cache/src
parentd6d729b0609957c0382749c30da507dda77561b7 (diff)
multiple xlators: move from strlen() to sizeof()
xlators/performance/nl-cache/src/nl-cache.c xlators/performance/md-cache/src/md-cache.c xlators/protocol/server/src/authenticate.c xlators/storage/bd/src/bd-helper.c For const strings, just do compile time size calc instead of runtime. Compile-tested only! Change-Id: I9b98940a38d85321a69436a1871930da367b918a updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
Diffstat (limited to 'xlators/performance/nl-cache/src')
-rw-r--r--xlators/performance/nl-cache/src/nl-cache.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xlators/performance/nl-cache/src/nl-cache.c b/xlators/performance/nl-cache/src/nl-cache.c
index 0f0e53bac2b..effe91e9798 100644
--- a/xlators/performance/nl-cache/src/nl-cache.c
+++ b/xlators/performance/nl-cache/src/nl-cache.c
@@ -319,7 +319,7 @@ nlc_getxattr (call_frame_t *frame, xlator_t *this, loc_t *loc, const char *key,
goto wind;
if (!key || (strncmp (key, GF_XATTR_GET_REAL_FILENAME_KEY,
- strlen (GF_XATTR_GET_REAL_FILENAME_KEY)) != 0))
+ SLEN (GF_XATTR_GET_REAL_FILENAME_KEY)) != 0))
goto wind;
local = nlc_local_init (frame, this, GF_FOP_GETXATTR, loc, NULL);
@@ -331,7 +331,7 @@ nlc_getxattr (call_frame_t *frame, xlator_t *this, loc_t *loc, const char *key,
if (!dict)
goto err;
- fname = key + strlen (GF_XATTR_GET_REAL_FILENAME_KEY);
+ fname = key + SLEN (GF_XATTR_GET_REAL_FILENAME_KEY);
hit = nlc_get_real_file_name (this, loc, fname, &op_ret,
&op_errno, dict);
if (hit)