summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/ec/src/ec-combine.c
diff options
context:
space:
mode:
authorYaniv Kaul <ykaul@redhat.com>2018-08-21 18:56:24 +0300
committerAmar Tumballi <amarts@redhat.com>2018-08-25 17:10:11 +0000
commit14ee864f8b573d1bccf4f586450947ba4aa690a9 (patch)
treeff5f153f1fa229ed018f9f8e3fd3141a07b5709b /xlators/cluster/ec/src/ec-combine.c
parent7e229cf1d5d4c0600f0763dac3acacb1b950fc3b (diff)
multiple files: move from strlen() to sizeof()
{ec-heal|ec-combine|ec-helpers|ec-inode-read}.c For const strings, just do compile time size calc instead of runtime. Compile-tested only! Change-Id: If92ba0a7a20f64b898d01c6e3b6708190ca93e04 updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
Diffstat (limited to 'xlators/cluster/ec/src/ec-combine.c')
-rw-r--r--xlators/cluster/ec/src/ec-combine.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/xlators/cluster/ec/src/ec-combine.c b/xlators/cluster/ec/src/ec-combine.c
index e4c660d9972..90e004336c0 100644
--- a/xlators/cluster/ec/src/ec-combine.c
+++ b/xlators/cluster/ec/src/ec-combine.c
@@ -251,9 +251,9 @@ ec_value_ignore (char *key)
(strcmp(key, GLUSTERFS_INODELK_COUNT) == 0) ||
(strcmp(key, GLUSTERFS_ENTRYLK_COUNT) == 0) ||
(strncmp(key, GF_XATTR_CLRLK_CMD,
- strlen (GF_XATTR_CLRLK_CMD)) == 0) ||
+ SLEN (GF_XATTR_CLRLK_CMD)) == 0) ||
(strcmp(key, DHT_IATT_IN_XDATA_KEY) == 0) ||
- (strncmp(key, EC_QUOTA_PREFIX, strlen(EC_QUOTA_PREFIX)) == 0) ||
+ (strncmp(key, EC_QUOTA_PREFIX, SLEN (EC_QUOTA_PREFIX)) == 0) ||
(fnmatch(MARKER_XATTR_PREFIX ".*." XTIME, key, 0) == 0) ||
(fnmatch(GF_XATTR_MARKER_KEY ".*", key, 0) == 0) ||
(XATTR_IS_NODE_UUID(key))) {
@@ -742,14 +742,14 @@ int32_t ec_dict_data_combine(dict_t * dict, char * key, data_t * value,
data->cbk->fop->xl->name);
}
- if (strncmp(key, GF_XATTR_CLRLK_CMD, strlen(GF_XATTR_CLRLK_CMD)) == 0)
+ if (strncmp(key, GF_XATTR_CLRLK_CMD, SLEN (GF_XATTR_CLRLK_CMD)) == 0)
{
return ec_dict_data_concat("{\n}", data->cbk, data->which, key, NULL,
NULL, _gf_false);
}
if (strncmp(key, GF_XATTR_LOCKINFO_KEY,
- strlen(GF_XATTR_LOCKINFO_KEY)) == 0)
+ SLEN (GF_XATTR_LOCKINFO_KEY)) == 0)
{
return ec_dict_data_merge(data->cbk, data->which, key);
}
@@ -771,7 +771,7 @@ int32_t ec_dict_data_combine(dict_t * dict, char * key, data_t * value,
return ec_dict_data_quota(data->cbk, data->which, key);
}
/* Ignore all other quota attributes */
- if (strncmp(key, EC_QUOTA_PREFIX, strlen(EC_QUOTA_PREFIX)) == 0) {
+ if (strncmp(key, EC_QUOTA_PREFIX, SLEN (EC_QUOTA_PREFIX)) == 0) {
return 0;
}