
7 Nov
2007
7 Nov
'07
8:48 p.m.
Dear Matthias,
in message 200711071529.49762.matthias.fuchs@esd-electronics.com you wrote:
when copying val from 'data[bytecount++]' it is common practice that val if of the same type as the array elements. So val should be unsigned char.
Maybe. But what's the difference?
I changed the sign check into a 'val & 0x80', which I think is fine an clean.
If it is indeed intended to be a test for a negative number, then this is neither nice nor clean.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
We have phasers, I vote we blast 'em!
-- Bailey, "The Corbomite Maneuver", stardate 1514.2