You can rewrite it as
#define NP_MAXREADY (((~0u)<<1)>>1)
then you would notice that the internal shift operation is completely useless, since its only effect is to shift bits of the highest order
#define NP_MAXREADY ((~0u)>>1)
which, in turn, is nothing more than
#define NP_MAXREADY (UINT_MAX/2)
In addition to what is indicated in another answer, it is not INT_MAX , since first of all it is unsigned here, so the type is different. Then the signed view, compared to unsigned can have padding bits, so you can never be sure that the two have the same value.
source share