[PATCH] nls: Fix utf8_to_utf32 parameter type in declaration and definition

ye.xingchen@zte.com.cn posted 1 patch 9 months, 1 week ago
fs/nls/nls_base.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[PATCH] nls: Fix utf8_to_utf32 parameter type in declaration and definition
Posted by ye.xingchen@zte.com.cn 9 months, 1 week ago
From: YeXingchen <ye.xingchen@zte.com.cn>

The declaration of utf8_to_utf32 in the header file uses
int len as the parameter type, while the definition uses int inlen.

This patch aligns the parameter name in the definition with the
declaration,changing inlen to len to ensure consistency.

Signed-off-by: YeXingchen <ye.xingchen@zte.com.cn>
---
 fs/nls/nls_base.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/nls/nls_base.c b/fs/nls/nls_base.c
index 18d597e49a19..59989205f1b5 100644
--- a/fs/nls/nls_base.c
+++ b/fs/nls/nls_base.c
@@ -52,7 +52,7 @@ static const struct utf8_table utf8_table[] =
 #define SURROGATE_LOW	0x00000400
 #define SURROGATE_BITS	0x000003ff

-int utf8_to_utf32(const u8 *s, int inlen, unicode_t *pu)
+int utf8_to_utf32(const u8 *s, int len, unicode_t *pu)
 {
 	unsigned long l;
 	int c0, c, nc;
@@ -71,7 +71,7 @@ int utf8_to_utf32(const u8 *s, int inlen, unicode_t *pu)
 			*pu = (unicode_t) l;
 			return nc;
 		}
-		if (inlen <= nc)
+		if (len <= nc)
 			return -1;
 		s++;
 		c = (*s ^ 0x80) & 0xFF;
-- 
2.25.1