X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=fs%2Fntfs%2Funistr.c;h=ec7405a80b4cbf83022b819c34261420de257e11;hb=c7b5ebbddf7bcd3651947760f423e3783bbe6573;hp=507f836f9d70133a234a8dcd08926cf26807513f;hpb=9213980e6a70d8473e0ffd4b39ab5b6caaba9ff5;p=linux-2.6.git diff --git a/fs/ntfs/unistr.c b/fs/ntfs/unistr.c index 507f836f9..ec7405a80 100644 --- a/fs/ntfs/unistr.c +++ b/fs/ntfs/unistr.c @@ -96,7 +96,7 @@ int ntfs_collate_names(const ntfschar *name1, const u32 name1_len, const ntfschar *upcase, const u32 upcase_len) { u32 cnt, min_len; - ntfschar c1, c2; + u16 c1, c2; min_len = name1_len; if (name1_len > name2_len) @@ -144,7 +144,7 @@ int ntfs_collate_names(const ntfschar *name1, const u32 name1_len, */ int ntfs_ucsncmp(const ntfschar *s1, const ntfschar *s2, size_t n) { - ntfschar c1, c2; + u16 c1, c2; size_t i; for (i = 0; i < n; ++i) { @@ -181,8 +181,8 @@ int ntfs_ucsncmp(const ntfschar *s1, const ntfschar *s2, size_t n) int ntfs_ucsncasecmp(const ntfschar *s1, const ntfschar *s2, size_t n, const ntfschar *upcase, const u32 upcase_size) { - ntfschar c1, c2; size_t i; + u16 c1, c2; for (i = 0; i < n; ++i) { if ((c1 = le16_to_cpu(s1[i])) < upcase_size) @@ -203,7 +203,7 @@ void ntfs_upcase_name(ntfschar *name, u32 name_len, const ntfschar *upcase, const u32 upcase_len) { u32 i; - ntfschar u; + u16 u; for (i = 0; i < name_len; i++) if ((u = le16_to_cpu(name[i])) < upcase_len) @@ -276,7 +276,7 @@ int ntfs_nlstoucs(const ntfs_volume *vol, const char *ins, } /* else (wc_len < 0) */ goto conversion_err; } - ucs[o] = cpu_to_le16('\0'); + ucs[o] = 0; *outs = ucs; return o; } /* else (!ucs) */ @@ -362,7 +362,7 @@ retry: wc = nls->uni2char(le16_to_cpu(ins[i]), ns + o, } /* wc < 0, real error. */ goto conversion_err; } - ns[o] = '\0'; + ns[o] = 0; *outs = ns; return o; } /* else (!ins) */