Question about int result of relational operator

T. William Wells bill at twwells.uucp
Sun Nov 6 14:22:38 AEST 1988


In article <7482 at ihlpl.ATT.COM> knudsen at ihlpl.ATT.COM (Knudsen) writes:
: Also be very wary of functions whose result is often treated as
: Boolean, but is really integer or pointer so that "true" returns
: as anything nonzero.  "Cast" these into Boolean if needed by
:       !!fcn(...)

Clearer, and likely to generate better code, is:

	fcn != 0

---
Bill
{uunet|novavax}!proxftl!twwells!bill



More information about the Comp.lang.c mailing list