From owner-svn-src-all@FreeBSD.ORG Thu Oct 1 10:30:08 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6481C1065694; Thu, 1 Oct 2009 10:30:08 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.cksoft.de (mail.cksoft.de [195.88.108.3]) by mx1.freebsd.org (Postfix) with ESMTP id 19E018FC1A; Thu, 1 Oct 2009 10:30:07 +0000 (UTC) Received: from localhost (amavis.fra.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id D157E41C736; Thu, 1 Oct 2009 12:30:06 +0200 (CEST) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([195.88.108.3]) by localhost (amavis.fra.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id MTeDMAz3D23A; Thu, 1 Oct 2009 12:30:06 +0200 (CEST) Received: by mail.cksoft.de (Postfix, from userid 66) id 3EBBC41C734; Thu, 1 Oct 2009 12:30:06 +0200 (CEST) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id 325CB4448E6; Thu, 1 Oct 2009 10:26:32 +0000 (UTC) Date: Thu, 1 Oct 2009 10:26:31 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Coleman Kane In-Reply-To: <200910010243.n912hpSM034846@svn.freebsd.org> Message-ID: <20091001102557.E26486@maildrop.int.zabbadoz.net> References: <200910010243.n912hpSM034846@svn.freebsd.org> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r197654 - head/sys/dev/if_ndis X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Oct 2009 10:30:08 -0000 On Thu, 1 Oct 2009, Coleman Kane wrote: > Author: cokane > Date: Thu Oct 1 02:43:51 2009 > New Revision: 197654 > URL: http://svn.freebsd.org/changeset/base/197654 > > Log: > style(9) fixes (always compare pointers to NULL) > > Also, the previous commit to sys/dev/if_ndis/if_ndis.c also included the > removal of a call to ndis_setstate_80211 that is no longer needed. The problem just is that sc->ndis_80211 is an integer and this broke the build. > Submitted by: sam > MFC after: 3 days > > Modified: > head/sys/dev/if_ndis/if_ndis.c > > Modified: head/sys/dev/if_ndis/if_ndis.c > ============================================================================== > --- head/sys/dev/if_ndis/if_ndis.c Thu Oct 1 02:08:42 2009 (r197653) > +++ head/sys/dev/if_ndis/if_ndis.c Thu Oct 1 02:43:51 2009 (r197654) > @@ -1534,7 +1534,7 @@ ndis_inputtask(dobj, arg) > if (m == NULL) > break; > KeReleaseSpinLock(&sc->ndis_rxlock, irql); > - if (sc->ndis_80211 && vap) > + if ((sc->ndis_80211 != NULL) && (vap != NULL)) > vap->iv_deliver_data(vap, vap->iv_bss, m); > else > (*ifp->if_input)(ifp, m); > @@ -1746,7 +1746,7 @@ ndis_ticktask(d, xsc) > sc->ndis_sts == NDIS_STATUS_MEDIA_CONNECT) { > sc->ndis_link = 1; > NDIS_UNLOCK(sc); > - if (sc->ndis_80211 && vap) { > + if ((sc->ndis_80211 != NULL) && (vap != NULL)) { > ndis_getstate_80211(sc); > ieee80211_new_state(vap, IEEE80211_S_RUN, -1); > } > @@ -1758,7 +1758,7 @@ ndis_ticktask(d, xsc) > sc->ndis_sts == NDIS_STATUS_MEDIA_DISCONNECT) { > sc->ndis_link = 0; > NDIS_UNLOCK(sc); > - if (sc->ndis_80211 && vap) > + if ((sc->ndis_80211 != NULL) && (vap != NULL)) > ieee80211_new_state(vap, IEEE80211_S_SCAN, 0); > NDIS_LOCK(sc); > if_link_state_change(sc->ifp, LINK_STATE_DOWN); > -- Bjoern A. Zeeb It will not break if you know what you are doing.