On Wed 05 Dec 2007 at 08:56:06 +0100, Richard Levitte wrote: > /* In this example, the function user_can_change() is obviously > intended to return a boolean value that it's unnecessary to > have an explicit test. */ > if(user_can_change(this)==1) /* UNNECESSARY */
Depending on how user_can_change() calculates its result, it might even be wrong, if it may return other values than 1 for true. (Like strcmp() should not be tested for -1 or 1, just < 0 and > 0). Never test for (in)equality with values other than 0 in boolean cases. > Richard Levitte [EMAIL PROTECTED] -Olaf. -- ___ Olaf 'Rhialto' Seibert -- You author it, and I'll reader it. \X/ rhialto/at/xs4all.nl -- Cetero censeo "authored" delendum esse.
