Just a few small comments below.
[...]
Why not get rid of the redundant local variable and simply do
*sum = (dev->checkpt_sum << 8) | (dev->checkpt_xor & 0xFF);
??
[...]
'data' is a 'const void *' and this casts away const. Probably fine, just
makes my toes curl.
[...]
here you are not casting away const, but since 'data' is a void pointer
the cast is just completely superfluous and should just go away.
[...]
Nitpicking, but this should be
if (dev->checkpt_cur_block < 0) {
ok = 0;
} else {
...
curly brace on both branches since it's used on one of them (according to
CodingStyle).
[...]
1) nitpicking about curly braces again (see above).
2) try grep'ing the source for "todo", "xxx", "fixme" and similar, then
check the age of those comments. If things like this are not addressed (by
other than a "todo" comment) on initial commit they stand a good chance of
never getting addressed...
--
Jesper Juhl <jj@chaosbits.net> http://www.chaosbits.net/
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please.
--