Module Name:    src
Committed By:   dyoung
Date:           Tue Apr 27 18:52:45 UTC 2010

Modified Files:
        src/sys/dev/mii: brgphy.c

Log Message:
For a couple of flags, use bool/true/false instead of int/1/0.


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sys/dev/mii/brgphy.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/mii/brgphy.c
diff -u src/sys/dev/mii/brgphy.c:1.53 src/sys/dev/mii/brgphy.c:1.54
--- src/sys/dev/mii/brgphy.c:1.53	Sat Mar 13 12:57:23 2010
+++ src/sys/dev/mii/brgphy.c	Tue Apr 27 18:52:45 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: brgphy.c,v 1.53 2010/03/13 12:57:23 kiyohara Exp $	*/
+/*	$NetBSD: brgphy.c,v 1.54 2010/04/27 18:52:45 dyoung Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: brgphy.c,v 1.53 2010/03/13 12:57:23 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: brgphy.c,v 1.54 2010/04/27 18:52:45 dyoung Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -90,8 +90,8 @@
 
 struct brgphy_softc {
 	struct mii_softc sc_mii;
-	int sc_isbge;
-	int sc_isbnx;
+	bool sc_isbge;
+	bool sc_isbnx;
 	int sc_bge_flags;
 	int sc_bnx_flags;
 };
@@ -255,13 +255,13 @@
 	aprint_normal("\n");
 
 	if (device_is_a(parent, "bge")) {
-		bsc->sc_isbge = 1;
+		bsc->sc_isbge = true;
 		dict = device_properties(parent);
 		if (!prop_dictionary_get_uint32(dict, "phyflags",
 			&bsc->sc_bge_flags))
 			aprint_error("failed to get phyflags");
 	} else if (device_is_a(parent, "bnx")) {
-		bsc->sc_isbnx = 1;
+		bsc->sc_isbnx = true;
 		dict = device_properties(parent);
 		prop_dictionary_get_uint32(dict, "phyflags",
 		    &bsc->sc_bnx_flags);
@@ -540,7 +540,7 @@
 	}
 
 	/* Handle any bge (NetXtreme/NetLink) workarounds. */
-	if (bsc->sc_isbge != 0) {
+	if (bsc->sc_isbge) {
 		if (!(sc->mii_flags & MIIF_HAVEFIBER)) {
 
 			if (bsc->sc_bge_flags & BGE_PHY_ADC_BUG)
@@ -592,7 +592,7 @@
 		}
 #if 0 /* not yet */
 	/* Handle any bnx (NetXtreme II) workarounds. */
-	} else if (sc->sc_isbnx != 0) {
+	} else if (sc->sc_isbnx) {
 		bnx_sc = sc->mii_pdata->mii_ifp->if_softc;
 
 		if (sc->mii_mpd_model == MII_MODEL_xxBROADCOM2_BCM5708S) {

Reply via email to