
Dear Tom,
In message 20131122205046.GU420@bill-the-cat you wrote:
So, the last report said that they had a tree missing 6ad77d88e57f6ab815ec7e85c5ac329054318c73, but yours can't be. Can you add some debug prints and see what's going on? Having u8 foo = bar(); if (a && foo == baz) { ... } not work, but: if (a && bar() == baz) { ... } work is quite puzzling. Thanks!
The actual code is this:
if (dols && mkcksum(dentptr->name) == prevcksum) {
versus
__u8 csum = mkcksum(dentptr->name, dentptr->ext); if (dols && csum == prevcksum) {
Note that csum is __u8, but prevcksum is __u16. Eventually there is a type issue. It looks a bit fishy to me that prevcksum 16 bits, while all operations are done on 8 bit data, and comparison is against 8 bit as well.
Best regards,
Wolfgang Denk