I am reading some C code and found preprocessors like this appear pretty frequently:
#if defined(ZERO_MIN_SUPPORT) && (ZERO_MIN_SUPPORT==1)
minimum = 0x0,
#else
minimum = 0x1,
#endif
I am wondering that, compared to #if ZERO_MIN_SUPPORT, does it have any advantages, or just a coding style?
In my view, no matter whether ZERO_MIN_SUPPORT is 1, 0, or undefined, #if ZERO_MIN_SUPPORT is always equivalent to #if defined(ZERO_MIN_SUPPORT) && (ZERO_MIN_SUPPORT==1).