Message ID | CAEgOgz47W7fVJVbfO1xHkYwhbA8DnanDiFs7EvmMR064Vv6MDA@mail.gmail.com |
---|---|
State | New |
Headers | show |
--- a/hw/pflash_cfi01.c +++ b/hw/pflash_cfi01.c @@ -50,13 +50,16 @@ do { \ } while(0) /* #define PFLASH_DEBUG */ -#ifdef PFLASH_DEBUG -#define DPRINTF(fmt, ...) \ +#define DO_DPRINTF(fmt, ...) \ do { \ printf("PFLASH: " fmt , ## __VA_ARGS__); \ } while (0) +#ifdef PFLASH_DEBUG +#define DPRINTF(fmt, ...) DO_PRINTF(fmt, ## __VA_ARGS__) #else -#define DPRINTF(fmt, ...) do { } while (0) +#define DPRINTF(fmt, ...) if(0) { \ + DO_PRINTF(fmt, ## __VA_ARGS__) \ +} #endif