dirsync review

Matthias Dieter Wallnöfer mdw at samba.org
Mon Mar 21 07:03:23 MDT 2011


it works like this:
> unsigned int i;
> ...
> for (i >= ...num_values - 1; i != (unsigned) -1; i--). 

Thanks for your fixing efforts,

Matthieu Patou wrote:
> On 21/03/2011 13:45, Matthias Dieter Wallnöfer wrote:
>> - with "int i" and "int k" in the dirsync implementation I'm still 
>> not very happy - I invite you to use the correct downto counting 
>> mechanism ("ldb_dn.c" shows how to do that in respect to the DN 
>> components)
> Let's have a look not sure it could be solved as as you can notice we 
> are counting backward from num_values to 0 and if I use an unsigned 
> int when k = 0, the next k-- will give me 4294967295 and not -1, I can 
> of course cast k when doing a comparison not sure it's much more elegant.
> Matthieu

More information about the samba-technical mailing list