[webkit-dev] strcmp result checking

Alexey Proskuryakov ap at webkit.org
Wed Dec 16 21:12:45 PST 2009

As current style rules say that tests for zero/non-zero should all be done without equality comparisons. However, this rule can cause significant readability problems if blindly applied to strcmp: if (!strcmp(string, "foobar")) naturally reads as "does not equal".

I think that this strcmp should be an exception to this rule. Current WebCore uses both forms, with the one I propose being slightly more common.

- WBR, Alexey Proskuryakov

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20091216/4b4fec8a/attachment.html>

More information about the webkit-dev mailing list