RE: (0 == foo), rather than (foo == 0)

From: Godbole, Amarendra (GE Consumer & Industrial) (Amarendra.Godbole_at_ge.com)
Date: 03/11/04

  • Next message: James Morris: "Re: Crypto API and keyed non-HMAC digest algorithms / Michael MIC"
    Date:	Thu, 11 Mar 2004 09:34:44 +0530
    To: <linux-kernel@vger.kernel.org>
    
    

    > As a result, using the former just tends to increase peoples
    > confusion by making code harder to read, which in turn tends
    > to increase the chance of bugs.

    Kindly don't insult the kernel developers' with such statements. ;-)
    They are smart enough to understand such constructs, which, I
    deduce from what someone said earlier in this thread. So no
    confusion would prevail here...[take it in a lighter vein folks, I
    am kidding.]

    > So don't do it. The kind of bug that the "0 == x" syntax
    > protects against is LESS LIKELY to happen than the kind of
    > bug it tends to cause.

    Agreed and understood. Thanks.

    Sincere apologies for my previous ``non-text wrapped'' post. This
    won't happen henceforth.

    Cheers,
    Amarendra

    --
    Picture Perfect Engineering / These opinions are mine.
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at  http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at  http://www.tux.org/lkml/
    

  • Next message: James Morris: "Re: Crypto API and keyed non-HMAC digest algorithms / Michael MIC"

    Relevant Pages

    • Re: [PATCH 01/04] Adding cipher mode context information to crypto_tfm
      ... This omission seems justified and ... it's going to cause confusion. ... James Morris ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: Platform device id
      ... This has potential for confusion and bugs. ... And since then I've found two other drivers affected (uartlite and ... getting rid of this exception and having all platform devices named ...
      (Linux-Kernel)
    • Re: [2.6 patch] Kconfig: rename "---help---" to "help" in Kconfig files (first p
      ... Early on there was some confusion about this from people writing new ... Kconfig entries, ... If it helps only a little bit to spot the help ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: mremap() bug IMHO not in 2.2
      ... > has not this particular vulnerability. ... vma isn't ever going to be _useful_, since nothing will actually find it. ... So yes, it creates some confusion in the VM layer, but it all seems ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: Platform device id
      ... This has potential for confusion and bugs. ... And since then I've found two other drivers affected (uartlite and ... getting rid of this exception and having all platform devices named ...
      (Linux-Kernel)