summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Weinberger <richard@nod.at>2016-01-02 23:12:42 +0100
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 21:20:20 -0700
commit44cd578eeb02a10588841b636d520396758e6483 (patch)
treefb8beb5af2a4e56bc3fe532bf8da9b4fa86f4691
parent819f5bcd533a7e73fcc88f3a36067864ad0bfb01 (diff)
ubifs: Use XATTR_*_PREFIX_LEN
...instead of open coding it. CRs-Fixed: 975289 Change-Id: I2d2b2fecfd6724baddb1d93ec5b4aeb2587b577f Signed-off-by: Richard Weinberger <richard@nod.at> Git-commit: 4fdd1d51ad5d059548c6539ac9d281f74d24bcbe Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git Signed-off-by: Nikhilesh Reddy <reddyn@codeaurora.org>
-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)
if (!strncmp(nm->name, XATTR_TRUSTED_PREFIX,
XATTR_TRUSTED_PREFIX_LEN)) {
- if (nm->name[sizeof(XATTR_TRUSTED_PREFIX) - 1] == '\0')
+ if (nm->name[XATTR_TRUSTED_PREFIX_LEN] == '\0')
return -EINVAL;
type = TRUSTED_XATTR;
} else if (!strncmp(nm->name, XATTR_USER_PREFIX,
@@ -277,7 +277,7 @@ static int check_namespace(const struct qstr *nm)
type = USER_XATTR;
} else if (!strncmp(nm->name, XATTR_SECURITY_PREFIX,
XATTR_SECURITY_PREFIX_LEN)) {
- if (nm->name[sizeof(XATTR_SECURITY_PREFIX) - 1] == '\0')
+ if (nm->name[XATTR_SECURITY_PREFIX_LEN] == '\0')
return -EINVAL;
type = SECURITY_XATTR;
} else