Going by MAX capitalization, it must be a macro, in which case the code is wrong. I am guessing this is a synthetic example, but still - try and get the basics right.
That's why in C++ people seem to generally recommend inline functions instead. Not only do the arguments only get evaluated once, but the whole thing is type safe too.
Macros, by definition, are always misused, complete the languages point of view. They exist to let the programmer get the job done when the language falls short.
> if (a < 0) a = 0;
> has been replaced with
> const int a = MAX(0,f());
Going by MAX capitalization, it must be a macro, in which case the code is wrong. I am guessing this is a synthetic example, but still - try and get the basics right.