I'd love to see the code; quite how they are not comparing a memcmp to 0 would be interesting to see...
This is why real C programmers use int as their bool type. :)
It has the same problem if a wider type (e.g. long) is assigned to it. Use _Bool instead.
return 0 == memcmp(hash_stage2, hash_stage2_reassured, SHA1_HASH_SIZE)
As in, return a bool on whether it matched.I mean, as I read it, the function returns true if they don't match?