CVS update: samba/source/include

Luke Kenneth Casson Leighton lkcl at switchboard.net
Tue Aug 11 01:23:50 EST 1998


> Chris, you should never put if statements in macros, use the ugly
> (a?b:c) form instead, otherwise you can produce incorrect code when

((a)?(b):(c)) _must_ be used for exactly the same reasons you are
suggesting that if should not be used, tridge, if a, b or c are macro
arguments. 

in fact, _all_ macro arguments should be surrounded by brackets, unless
your macros rely on text substitution, e.g the construction of function
names from a macro argument.

> you have things like:
> 
> if (foo) 
>    DEBUG((blah));
> else
>    DEBUG((blooh));
> 
> 

<a href="mailto:lkcl at samba.anu.edu.au" > Luke Kenneth Casson Leighton  </a>
<a href="http://mailhost.cb1.com/~lkcl"> Samba and Network Development </a>
<a href="http://www.samba.co.uk"       > Samba and Network Consultancy </a>



More information about the samba-cvs mailing list