I prefer something like this so you can use
#if DEBUGrather than#ifdef DEBUG:#define DEBUG 1
This also allows you to do things like:
if (DEBUG) {
...stuff...
}
if (DEBUG && packetIsV6(packet)) {
pretteyPrint6(packet);
}
Which will format better. And is still optimized away.
(oh - and you can easily convert it to being enabled/disabled at run-time)