Subject: Re: spring cleaning step #1

Re: spring cleaning step #1

From: Alexander Lamaison <swish_at_lammy.co.uk>
Date: Sat, 17 Apr 2010 15:44:17 +0100

On 17 April 2010 15:41, Daniel Stenberg <daniel_at_haxx.se> wrote:
> On Sat, 17 Apr 2010, Alexander Lamaison wrote:
>
>> I notice also that you changed many non-size unsigned longs to ints. What
>> was the motivation for this?  (I'm not suggesting its wrong - just that my
>> understanding of the practical implications of signed v unsigned in C is
>> hazy at best).
>
> I changed the types according to this:

> 'int' - for variables that are just counters and generic values that are not
> likely to be extremely large (ie they will always be less than 2 billion).

My question relates to this change. Why is int better than unsigned long?

Alex
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2010-04-17