aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Weinberger <richard@nod.at>2016-01-02 17:12:42 -0500
committerRichard Weinberger <richard@nod.at>2016-01-10 06:33:47 -0500
commit4fdd1d51ad5d059548c6539ac9d281f74d24bcbe (patch)
treeb48f86c0a0086d146b7750ce78323ba0916f5d33
parent170eb55f7d4ba9564736ba298a7d4985422db4cc (diff)
ubifs: Use XATTR_*_PREFIX_LEN
...instead of open coding it. Signed-off-by: Richard Weinberger <richard@nod.at>
-rw-r--r--fs/ubifs/xattr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ubifs/xattr.c b/fs/ubifs/xattr.c
index e8b01b721e99..e53292d0c21b 100644
--- a/fs/ubifs/xattr.c
+++ b/fs/ubifs/xattr.c
@@ -267,7 +267,7 @@ static int check_namespace(const struct qstr *nm)
267 267
268 if (!strncmp(nm->name, XATTR_TRUSTED_PREFIX, 268 if (!strncmp(nm->name, XATTR_TRUSTED_PREFIX,
269 XATTR_TRUSTED_PREFIX_LEN)) { 269 XATTR_TRUSTED_PREFIX_LEN)) {
270 if (nm->name[sizeof(XATTR_TRUSTED_PREFIX) - 1] == '\0') 270 if (nm->name[XATTR_TRUSTED_PREFIX_LEN] == '\0')
271 return -EINVAL; 271 return -EINVAL;
272 type = TRUSTED_XATTR; 272 type = TRUSTED_XATTR;
273 } else if (!strncmp(nm->name, XATTR_USER_PREFIX, 273 } else if (!strncmp(nm->name, XATTR_USER_PREFIX,
@@ -277,7 +277,7 @@ static int check_namespace(const struct qstr *nm)
277 type = USER_XATTR; 277 type = USER_XATTR;
278 } else if (!strncmp(nm->name, XATTR_SECURITY_PREFIX, 278 } else if (!strncmp(nm->name, XATTR_SECURITY_PREFIX,
279 XATTR_SECURITY_PREFIX_LEN)) { 279 XATTR_SECURITY_PREFIX_LEN)) {
280 if (nm->name[sizeof(XATTR_SECURITY_PREFIX) - 1] == '\0') 280 if (nm->name[XATTR_SECURITY_PREFIX_LEN] == '\0')
281 return -EINVAL; 281 return -EINVAL;
282 type = SECURITY_XATTR; 282 type = SECURITY_XATTR;
283 } else 283 } else