diff options
Diffstat (limited to 'fs/cifsd/unicode.c')
-rw-r--r-- | fs/cifsd/unicode.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/fs/cifsd/unicode.c b/fs/cifsd/unicode.c index 38bba50c4f16..a0db699ddafd 100644 --- a/fs/cifsd/unicode.c +++ b/fs/cifsd/unicode.c @@ -27,7 +27,7 @@ * Return: string length after conversion */ static int smb_utf16_bytes(const __le16 *from, int maxbytes, - const struct nls_table *codepage) + const struct nls_table *codepage) { int i; int charlen, outlen = 0; @@ -65,7 +65,7 @@ static int smb_utf16_bytes(const __le16 *from, int maxbytes, */ static int cifs_mapchar(char *target, const __u16 src_char, const struct nls_table *cp, - bool mapchar) + bool mapchar) { int len = 1; @@ -156,7 +156,7 @@ static inline int is_char_allowed(char *ch) * Return: string length after conversion */ static int smb_from_utf16(char *to, const __le16 *from, int tolen, int fromlen, - const struct nls_table *codepage, bool mapchar) + const struct nls_table *codepage, bool mapchar) { int i, charlen, safelen; int outlen = 0; @@ -210,7 +210,7 @@ static int smb_from_utf16(char *to, const __le16 *from, int tolen, int fromlen, * Return: string length after conversion */ int smb_strtoUTF16(__le16 *to, const char *from, int len, - const struct nls_table *codepage) + const struct nls_table *codepage) { int charlen; int i; @@ -224,7 +224,7 @@ int smb_strtoUTF16(__le16 *to, const char *from, int len, * in destination len is length in wchar_t units (16bits) */ i = utf8s_to_utf16s(from, len, UTF16_LITTLE_ENDIAN, - (wchar_t *)to, len); + (wchar_t *)to, len); /* if success terminate and exit */ if (i >= 0) @@ -267,7 +267,8 @@ success: * Return: destination string buffer or error ptr */ char *smb_strndup_from_utf16(const char *src, const int maxlen, - const bool is_unicode, const struct nls_table *codepage) + const bool is_unicode, + const struct nls_table *codepage) { int len, ret; char *dst; @@ -279,7 +280,7 @@ char *smb_strndup_from_utf16(const char *src, const int maxlen, if (!dst) return ERR_PTR(-ENOMEM); ret = smb_from_utf16(dst, (__le16 *)src, len, maxlen, codepage, - false); + false); if (ret < 0) { kfree(dst); return ERR_PTR(-EINVAL); @@ -318,7 +319,7 @@ char *smb_strndup_from_utf16(const char *src, const int maxlen, * Return: char length after conversion */ int smbConvertToUTF16(__le16 *target, const char *source, int srclen, - const struct nls_table *cp, int mapchars) + const struct nls_table *cp, int mapchars) { int i, j, charlen; char src_char; |