[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20080416.181221.88201322.davem@davemloft.net>
Date: Wed, 16 Apr 2008 18:12:21 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: allan.stephens@...driver.com
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH 1/7 net-2.6.26] [TIPC]: Remove inlining of reference
table locking routines
From: "Stephens, Allan" <allan.stephens@...driver.com>
Date: Wed, 16 Apr 2008 07:06:21 -0700
> Does your preference for use of the "!ptr" style also apply to
> non-pointer variables? (For example, do you also prefer to see
> "!count" rather than "count == 0"?) I'm asking because I've
> received conflicting guidance in the past (not from you, of course),
> which gave me the impression that the "ptr == NULL" form was the way
> the Linux kernel gatekeepers wanted to see things done.
I'm mostly ambivalent about that particular case.
But if I had to choose I'd say use "== 0" because
that is an easy way to visually distinguish pointer
NULL checks vs. integer zero ones without having
to know or see the type of the variable.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists