...
If the putc() macro evaluates its stream argument multiple times, this might still seem safe, as the tertiary operator ternary conditional expression ostensibly prevents multiple calls to fopen(). However, there is no guarantee that these would happen in distinct sequence points. Consequently this code also violates EXP30-C. Do not depend on order of evaluation between sequence points.
...