[Freeipa-devel] Suggested additions to codding standard page on freeIPA wiki.

Simo Sorce ssorce at redhat.com
Sat Nov 1 16:58:24 UTC 2008


On Sat, 2008-11-01 at 11:05 -0400, John Dennis wrote:
> I somewhat agree, I'm O.K. with "if (!*str)", it's compact
> (especially 
> in loop constructs) and easy to read. But there are other cases where 
> the ! operator is misleading.
> 
> I find this coding style counter-intuitive to read:
> 
> if (!strcmp(a,b))
> 
> I prefer
> 
> if (strcmp(a,b) == 0)

+1

-- 
Simo Sorce * Red Hat, Inc * New York




More information about the Freeipa-devel mailing list