more on TRUE and FALSE (side-comment)

Dan Bernstein brnstnd at kramden.acf.nyu.edu
Sat Sep 22 13:27:30 AEST 1990


In article <18097 at haddock.ima.isc.com> karl at kelp.ima.isc.com (Karl Heuer) writes:
> In article <14084:Sep2105:38:0890 at kramden.acf.nyu.edu> brnstnd at kramden.acf.nyu.edu (Dan Bernstein) writes:
   [ incorrectly ]
> >#define STREQ(a,b)  ( *(a) == *(b) && *(a) && !strcmp((a)+1, (b)+1) )
> #define STREQ(a,b)  ( *(a) == *(b) && !(*(a) && strcmp((a)+1, (b)+1)) )

Yes, you're right. Sorry. Thanks also to Peter Montgomery for pointing
this out. In any case it's better than the original macro, whether
strcmp is inlined or not.

---Dan



More information about the Comp.lang.c mailing list