On Tue, Aug 24, 2010 at 1:38 AM, David Seikel <onef...@gmail.com> wrote: > Yes, I'm fully aware that far to often I just do "if (pointer)" or "if > (!pointer)". I don't see "if (!!pointer)" as being any more readable > or correct than "if (pointer)", while grudgingly admitting that "if > (NULL != pointer)" is likely more correct. It says what is meant, and
And you could check the script actually changed if (a != NULL) to if (a). Suppose you have a function with an Eina_Bool parameter. It's wrong to to do 1) func(3); 2) char *a = "bla"; func(a) 3) Eina_Bool func2() { int a = 3; return a; } You have an Eina_Bool, that should be true or false. "!!" will convert that pointer to EINA_TRUE if it's different than 0 and to EINA_FALSE if it's 0. Btw, googling for "C programming double negation" does return some meaningful results. Lucas De Marchi ------------------------------------------------------------------------------ Sell apps to millions through the Intel(R) Atom(Tm) Developer Program Be part of this innovative community and reach millions of netbook users worldwide. Take advantage of special opportunities to increase revenue and speed time-to-market. Join now, and jumpstart your future. http://p.sf.net/sfu/intel-atom-d2d _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel