The on-disk erofs_xattr_entry.e_name_len is declared as u8, which
implies the maximum length of the xattr name.

Let's also declare xattr_prefix.prefix_len as u8 to keep sync with the
on-disk structure.

Signed-off-by: Jingbo Xu <[email protected]>
---
 lib/xattr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/xattr.c b/lib/xattr.c
index 1a22284..a292f2c 100644
--- a/lib/xattr.c
+++ b/lib/xattr.c
@@ -41,7 +41,7 @@ static unsigned int shared_xattrs_count, shared_xattrs_size;
 
 static struct xattr_prefix {
        const char *prefix;
-       u16 prefix_len;
+       u8 prefix_len;
 } xattr_types[] = {
        [EROFS_XATTR_INDEX_USER] = {
                XATTR_USER_PREFIX,
-- 
2.19.1.6.gb485710b

Reply via email to