* Eric Blake (ebl...@redhat.com) wrote:
> The point of writing a macro embedded in a 'do { ... } while (0)'
> loop is so that the macro can be used as a drop-in statement with
> the caller supplying the trailing ';'. Although our coding style
> frowns on brace-less 'if':
> if (cond)
> statem
On 11/30/2017 08:43 AM, Michael S. Tsirkin wrote:
On Thu, Nov 30, 2017 at 07:41:59AM -0600, Eric Blake wrote:
The point of writing a macro embedded in a 'do { ... } while (0)'
loop is so that the macro can be used as a drop-in statement with
the caller supplying the trailing ';'. Although our c
On Thu, Nov 30, 2017 at 07:41:59AM -0600, Eric Blake wrote:
> The point of writing a macro embedded in a 'do { ... } while (0)'
> loop is so that the macro can be used as a drop-in statement with
> the caller supplying the trailing ';'. Although our coding style
> frowns on brace-less 'if':
> if
On Thu, 30 Nov 2017 07:41:59 -0600
Eric Blake wrote:
> The point of writing a macro embedded in a 'do { ... } while (0)'
> loop is so that the macro can be used as a drop-in statement with
> the caller supplying the trailing ';'. Although our coding style
> frowns on brace-less 'if':
> if (con
The point of writing a macro embedded in a 'do { ... } while (0)'
loop is so that the macro can be used as a drop-in statement with
the caller supplying the trailing ';'. Although our coding style
frowns on brace-less 'if':
if (cond)
statement;
else
something else;
the use of do/while