On 8/19/09 11:08 PM, Patrick Georgi wrote:
+static int tohex8(int c) +{
- return (c<=9)?(c+'0'):(c-10+'a');
+}
+static void tohex32(int val, char* dest) +{
- dest[0]=tohex8(val>>24);
- dest[1]=tohex8((val>>16) & 0xff);
- dest[2]=tohex8((val>>8) & 0xff);
- dest[3]=tohex8((val) & 0xff);
+}
I think I agree with Myles, those val/c should probably be u8 and u32?
Acked-by: Stefan Reinauer stepan@coresystems.de