[lkml]   [2006]   [Aug]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: single bit flip detector.
On Wed, 2 Aug 2006, Jan Engelhardt wrote:
> > printk(" %02x", (unsigned char)data[offset + i]);
> Remove cast. (Or does it spew a warning message for you?)

No warning, but you still want the cast...

On PPC and ARM that will work fine, since char is unsigned.

But on most other platforms char is signed, and contrary to popular belief,
`%02x' doesn't mean `limit this field to 2 characters', so it would print e.g.
ffffffff instead of ff for -1.



Geert Uytterhoeven -- There's lots of Linux beyond ia32 --

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2006-08-06 13:09    [W:0.101 / U:5.444 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site