summaryrefslogtreecommitdiffstats
path: root/xlators/storage
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/storage
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/storage')
-rw-r--r--xlators/storage/bd/src/bd-helper.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xlators/storage/bd/src/bd-helper.c b/xlators/storage/bd/src/bd-helper.c
index ca5a3b741ba..b2bcf0609da 100644
--- a/xlators/storage/bd/src/bd-helper.c
+++ b/xlators/storage/bd/src/bd-helper.c
@@ -154,7 +154,7 @@ check:
}
dm_list_iterate_items (strl, tags) {
if (!strncmp (strl->str, GF_XATTR_VOL_ID_KEY,
- strlen (GF_XATTR_VOL_ID_KEY))) {
+ SLEN (GF_XATTR_VOL_ID_KEY))) {
uuid = _gf_true;
break;
}
@@ -168,7 +168,7 @@ check:
goto out;
}
- op_ret = gf_uuid_parse (strl->str + strlen (GF_XATTR_VOL_ID_KEY) + 1,
+ op_ret = gf_uuid_parse (strl->str + SLEN (GF_XATTR_VOL_ID_KEY) + 1,
vg_uuid);
if (op_ret < 0) {
gf_log (this->name, GF_LOG_ERROR,