Re: [Qemu-devel] [PATCH v2 6/7] maint: Fix macros with broken 'do/while(0); ' usage

2017-12-02 Thread Juan Quintela
Eric Blake wrote: > The point of writing a macro embedded in a 'do { ... } while (0)' > loop (particularly if the macro has multiple statements or would > otherwise end with an 'if' statement) is so that the macro can be > used as a drop-in statement with the caller supplying the > trailing ';'.

[Qemu-devel] [PATCH v2 6/7] maint: Fix macros with broken 'do/while(0); ' usage

2017-12-01 Thread Eric Blake
The point of writing a macro embedded in a 'do { ... } while (0)' loop (particularly if the macro has multiple statements or would otherwise end with an 'if' statement) is so that the macro can be used as a drop-in statement with the caller supplying the trailing ';'. Although our coding style fro