I’ve come across this a few times recently:
if ((flags & PERFORM_DELETION_CONCURRENTLY) == PERFORM_DELETION_CONCURRENTLY)
...
What’s the reason for the extra comparison? Why not this?
if (flags & PERFORM_DELETION_CONCURRENTLY)
...
My guess is that it’s a leftover habit to silence warnings from the days of yore when compilers were more strict.
There is also the possibility that in the mask there is more than one bit set. In that case, the two comparisons have different semantics.