lkml.org 
[lkml]   [1998]   [Aug]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: 2.1.120pre2: Bug in strnicmp() noted in 2.1.119pre1 is still there!
From
Date
Horst von Brand <vonbrand@sleipnir.valparaiso.cl> writes:
> [Bcc:d to linux-patches@samba.anu.edu.au]
> It makes no sense to compare tolower(*s1) to tolower(*s2) all over the
> place and then to just forget about that and compare the raw characters for
> the result...
>
> --- linux/fs/isofs/inode.c.dist-2.1.120-2 Sun Aug 30 21:17:05 1998
> +++ linux/fs/isofs/inode.c Sun Aug 30 21:20:32 1998
> @@ -137,7 +137,7 @@
> }
> if (*s1 == 0 && *s2 == 0) return 0;
> if (*s1 && *s2) {
> - if (*s1 > *s2) return 1;
> + if (tolower(*s1) > tolower(*s2)) return 1;
> return -1;
> }
> if (*s1) return 1;
>
> Now compiling 2.1.120pre2 (with the above patch).

Well, if you're going to do that, you also need to change the equality
line above to be:
if (tolower(*s1) == tolower(*s2)) return 0;

Michael.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html

\
 
 \ /
  Last update: 2005-03-22 13:44    [W:0.356 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site