Subject: Re: [PATCH] d80211: fix some 0 vs. NULL comparisons

From: "Jouni Malinen" <[email-masked]>
Date: Mon, 14 Aug 2006 08:48:13 -0700

On Mon, Aug 14, 2006 at 03:20:58PM +0200, Johannes Berg wrote:
> Johannes Berg wrote:
> >-    if (!local->hw->passive_scan) {
> >+    if (local->hw->passive_scan == NULL) {
> 
> Alright, this is icky. I'll make another pass and change it all to if 
> (x) or if (!x) instead of comparing to NULL. Don't hold your breath 
> though, earliest next weekend.

Well.. I'm perfectly fine with comparing function pointers to NULL in
this kind of case.. In many cases, I find fp == NULL to be clearer than
!fp, but for the fp != NULL case I would rather not see != NULL.. Not
very consistent, but can't really help with that on this kind of coding
style opinions. Anyway, replacing 0 with NULL is a good change.

-- 
Jouni Malinen                                            PGP id EFC895FA