Message ID | CA+KKJYB+xAQ68o4xPqgnJ8KoV1vVTtNztkii2s6L=QuEy6hixw@mail.gmail.com |
---|---|
State | New |
Headers | show |
diff --git a/hw/pci-bridge/dec.c b/hw/pci-bridge/dec.c index 840c961..84149da 100644 --- a/hw/pci-bridge/dec.c +++ b/hw/pci-bridge/dec.c @@ -32,14 +32,16 @@ #include "hw/pci/pci_bus.h" /* debug DEC */ -//#define DEBUG_DEC - -#ifdef DEBUG_DEC -#define DEC_DPRINTF(fmt, ...) \ - do { printf("DEC: " fmt , ## __VA_ARGS__); } while (0) -#else -#define DEC_DPRINTF(fmt, ...) -#endif + +#ifndef DEBUG_DEC +#define DEBUG_DEC 0 +#endif + +#define DEC_DPRINTF(fmt, ...) do { \ + if (DEBUG_DEC) { \ + fprintf(stderr, "DEC: " fmt , ## __VA_ARGS__); \ + } \ +} while (0); #define DEC_21154(obj) OBJECT_CHECK(DECState, (obj), TYPE_DEC_21154)