Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/usr.sbin/installboot
On Mon, Oct 30, 2006 at 03:59:21PM +0000, Christos Zoulas wrote:
> >
> >I've also deliberatly used:
> >
> >#define x(y) if (y); else {...}
> >
> >To avoid having to wrap the expansion inside do ... while (0);
>
> How is one supposed to use this macro?
I remember now, it would be for single statement conditionals. eg:
#define return_nz(r) if (!r); else return (r)
Which is quite happy as:
return_nz(a);
if (b)
return_nz(a);
if (c)
...
else
return_nz(a);
David
--
David Laight: david%l8s.co.uk@localhost
Home |
Main Index |
Thread Index |
Old Index