On 11/28/2017 02:05 PM, Eric Blake wrote:
Better yet, please fix the PFLASH_DEBUG code to avoid bitrot in the
first place, by rewriting the bad pattern:
into the good pattern:
#ifdef PFLASH_DEBUG
# define PFLASH_PRINT 1
#else
# define PFLASH_PRINT 0
#endif
#define DPRINTF(fmt, ...) \
do { \
if (PFLASH_PRINT) { \
fprintf(stderr, "PFLASH: " fmt, ## __VA_ARGS__); \
}; \
Serves me right for typing this without testing; the extra ; is spurious.
By the way, this is one of the Bite-Sized Tasks that never seems to get
finished...
https://wiki.qemu.org/BiteSizedTasks#Bitrot_prevention
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org