CVS update: samba/source/smbd

Simo Sorce idra at samba.org
Tue Mar 12 19:26:02 EST 2002


On Mon, 2002-03-11 at 17:12, Gerald Carter wrote:
> On Sun, 10 Mar 2002, Simo Sorce wrote:
> 
> > 
> > Date:	Sun Mar 10 11:10:59 2002
> > Author:	idra
> > 
> > Update of /data/cvs/samba/source/smbd
> > In directory va:/tmp/cvs-serv14022
> > 
> > Modified Files:
> >       Tag: SAMBA_2_2
> > 	mangle.c 
> > Log Message:
> > silly typo since 98?
> > 
> > 
> > Revisions:
> > mangle.c		1.31.4.3 => 1.31.4.4
> > 	http://www.samba.org/cgi-bin/cvsweb/samba/source/smbd/mangle.c?r1=1.31.4.3&r2=1.31.4.4
> 
> 
> diff -u -r1.31.4.3 -r1.31.4.4
> --- samba/source/smbd/mangle.c  2001/12/26 08:32:26     1.31.4.3
> +++ samba/source/smbd/mangle.c  2002/03/10 19:10:59     1.31.4.4
> @@ -555,7 +555,7 @@
>    if( s1 && (s2 = strrchr( raw_name, '.' )) )
>      {
>      i = 1;
> -    while( s1[i] && (tolower( s1[1] ) == s2[i]) )
> +    while( s1[i] && (tolower( s1[i] ) == s2[i]) )
>        i++;
>      if( !s1[i] && !s2[i] )
>        {
> 
> What typo?
> 

huh? s1[1] instead of s1[i] !

we are checking s1 and s2 are equal (same extension)!
This can be done only checking with the same index, not checking always
the same char (eg. 1 [one] the second ) of s1 with all the chars of s2.

If it's not a typo, it's an error!

Or I am totally insane and should sleep some more :)

-- 
Simo Sorce
----------
Una scelta di liberta': Software Libero.
A choice of freedom: Free Software.
http://www.softwarelibero.it




More information about the samba-cvs mailing list