| Submitter | Peter Crosthwaite |
|---|---|
| Date | Oct. 31, 2012, 4:13 a.m. |
| Message ID | <CAEgOgz47W7fVJVbfO1xHkYwhbA8DnanDiFs7EvmMR064Vv6MDA@mail.gmail.com> |
| Download | mbox | patch |
| Permalink | /patch/195729/ |
| State | New |
| Headers | show |
Comments
Patch
--- 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