Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 Oct 2009 11:52:07 +0000 (UTC)
From:      Coleman Kane <cokane@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r197659 - head/sys/dev/if_ndis
Message-ID:  <200910011152.n91Bq7lt050048@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cokane
Date: Thu Oct  1 11:52:06 2009
New Revision: 197659
URL: http://svn.freebsd.org/changeset/base/197659

Log:
  Fix a bad use of NULL instead of zero for int comparison. Sorry for the
  breakage.
  
  Submitted by:	bz, des, onemda
  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 10:53:12 2009	(r197658)
+++ head/sys/dev/if_ndis/if_ndis.c	Thu Oct  1 11:52:06 2009	(r197659)
@@ -1534,7 +1534,7 @@ ndis_inputtask(dobj, arg)
 		if (m == NULL)
 			break;
 		KeReleaseSpinLock(&sc->ndis_rxlock, irql);
-		if ((sc->ndis_80211 != NULL) && (vap != NULL))
+		if ((sc->ndis_80211 != 0) && (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 != NULL) && (vap != NULL)) {
+		if ((sc->ndis_80211 != 0) && (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 != NULL) && (vap != NULL))
+		if ((sc->ndis_80211 != 0) && (vap != NULL))
 			ieee80211_new_state(vap, IEEE80211_S_SCAN, 0);
 		NDIS_LOCK(sc);
 		if_link_state_change(sc->ifp, LINK_STATE_DOWN);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200910011152.n91Bq7lt050048>