Commit d02d48d8650bf3e2011f25373dbcf87f3c19f16b

Authored by Al Viro
Committed by Linus Torvalds
1 parent 6ca1584173

[PATCH] isofs endianness annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Showing 1 changed file with 5 additions and 5 deletions Side-by-side Diff

... ... @@ -14,9 +14,9 @@
14 14 * Convert Unicode 16 to UTF-8 or ASCII.
15 15 */
16 16 static int
17   -uni16_to_x8(unsigned char *ascii, u16 *uni, int len, struct nls_table *nls)
  17 +uni16_to_x8(unsigned char *ascii, __be16 *uni, int len, struct nls_table *nls)
18 18 {
19   - wchar_t *ip, ch;
  19 + __be16 *ip, ch;
20 20 unsigned char *op;
21 21  
22 22 ip = uni;
... ... @@ -24,8 +24,8 @@
24 24  
25 25 while ((ch = get_unaligned(ip)) && len) {
26 26 int llen;
27   - ch = be16_to_cpu(ch);
28   - if ((llen = nls->uni2char(ch, op, NLS_MAX_CHARSET_SIZE)) > 0)
  27 + llen = nls->uni2char(be16_to_cpu(ch), op, NLS_MAX_CHARSET_SIZE);
  28 + if (llen > 0)
29 29 op += llen;
30 30 else
31 31 *op++ = '?';
... ... @@ -82,7 +82,7 @@
82 82 len = wcsntombs_be(outname, de->name,
83 83 de->name_len[0] >> 1, PAGE_SIZE);
84 84 } else {
85   - len = uni16_to_x8(outname, (u16 *) de->name,
  85 + len = uni16_to_x8(outname, (__be16 *) de->name,
86 86 de->name_len[0] >> 1, nls);
87 87 }
88 88 if ((len > 2) && (outname[len-2] == ';') && (outname[len-1] == '1')) {