samba4: unsigned char -> uint8

tridge at tridge at
Sat May 29 23:36:03 GMT 2004

 > Then why not 'unsigned char'.  But you have already committed that
 > change...

I think that "uint8_t *" is much better than "unsigned char *" when
what we want is an array of bytes. It makes it very clear that we are
treating the data as bytes, for routines like hashing, raw packets
etc. The other obvious alternative would be "byte_t", but given that
uint8_t is defined as a standard, I think its a better choice.

If what we want is a string, then "char *" is the right choice. 

I also quite like uint_t, for non-wire integers that need to be
unsigned. I find it very clear and easy to read in code. For signed
non-wire integers "int" is fine.

Cheers, Tridge

More information about the samba-technical mailing list