summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authoryongari <yongari@FreeBSD.org>2008-02-14 01:25:01 +0000
committeryongari <yongari@FreeBSD.org>2008-02-14 01:25:01 +0000
commitdf40a22dd2f6dd8065cf228988e38193ec7ff119 (patch)
treed003aa8901c8ecdc7050d2aa54f48e6cc5ee7c24 /sys/dev
parent182a7cea0b8a83806ec4790bff5a432131a61e32 (diff)
downloadFreeBSD-src-df40a22dd2f6dd8065cf228988e38193ec7ff119.zip
FreeBSD-src-df40a22dd2f6dd8065cf228988e38193ec7ff119.tar.gz
Prefer NULL over integer 0 for pointer type.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/sk/if_sk.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/sys/dev/sk/if_sk.c b/sys/dev/sk/if_sk.c
index 9dee683..bda9e6c 100644
--- a/sys/dev/sk/if_sk.c
+++ b/sys/dev/sk/if_sk.c
@@ -2079,7 +2079,7 @@ sk_dma_alloc(sc_if)
for (i = 0; i < SK_TX_RING_CNT; i++) {
txd = &sc_if->sk_cdata.sk_txdesc[i];
txd->tx_m = NULL;
- txd->tx_dmamap = 0;
+ txd->tx_dmamap = NULL;
error = bus_dmamap_create(sc_if->sk_cdata.sk_tx_tag, 0,
&txd->tx_dmamap);
if (error != 0) {
@@ -2099,7 +2099,7 @@ sk_dma_alloc(sc_if)
for (i = 0; i < SK_RX_RING_CNT; i++) {
rxd = &sc_if->sk_cdata.sk_rxdesc[i];
rxd->rx_m = NULL;
- rxd->rx_dmamap = 0;
+ rxd->rx_dmamap = NULL;
error = bus_dmamap_create(sc_if->sk_cdata.sk_rx_tag, 0,
&rxd->rx_dmamap);
if (error != 0) {
@@ -2194,7 +2194,7 @@ sk_dma_jumbo_alloc(sc_if)
for (i = 0; i < SK_JUMBO_RX_RING_CNT; i++) {
jrxd = &sc_if->sk_cdata.sk_jumbo_rxdesc[i];
jrxd->rx_m = NULL;
- jrxd->rx_dmamap = 0;
+ jrxd->rx_dmamap = NULL;
error = bus_dmamap_create(sc_if->sk_cdata.sk_jumbo_rx_tag, 0,
&jrxd->rx_dmamap);
if (error != 0) {
@@ -2233,7 +2233,7 @@ sk_dma_free(sc_if)
sc_if->sk_rdata.sk_tx_ring,
sc_if->sk_cdata.sk_tx_ring_map);
sc_if->sk_rdata.sk_tx_ring = NULL;
- sc_if->sk_cdata.sk_tx_ring_map = 0;
+ sc_if->sk_cdata.sk_tx_ring_map = NULL;
bus_dma_tag_destroy(sc_if->sk_cdata.sk_tx_ring_tag);
sc_if->sk_cdata.sk_tx_ring_tag = NULL;
}
@@ -2248,7 +2248,7 @@ sk_dma_free(sc_if)
sc_if->sk_rdata.sk_rx_ring,
sc_if->sk_cdata.sk_rx_ring_map);
sc_if->sk_rdata.sk_rx_ring = NULL;
- sc_if->sk_cdata.sk_rx_ring_map = 0;
+ sc_if->sk_cdata.sk_rx_ring_map = NULL;
bus_dma_tag_destroy(sc_if->sk_cdata.sk_rx_ring_tag);
sc_if->sk_cdata.sk_rx_ring_tag = NULL;
}
@@ -2259,7 +2259,7 @@ sk_dma_free(sc_if)
if (txd->tx_dmamap) {
bus_dmamap_destroy(sc_if->sk_cdata.sk_tx_tag,
txd->tx_dmamap);
- txd->tx_dmamap = 0;
+ txd->tx_dmamap = NULL;
}
}
bus_dma_tag_destroy(sc_if->sk_cdata.sk_tx_tag);
@@ -2272,13 +2272,13 @@ sk_dma_free(sc_if)
if (rxd->rx_dmamap) {
bus_dmamap_destroy(sc_if->sk_cdata.sk_rx_tag,
rxd->rx_dmamap);
- rxd->rx_dmamap = 0;
+ rxd->rx_dmamap = NULL;
}
}
if (sc_if->sk_cdata.sk_rx_sparemap) {
bus_dmamap_destroy(sc_if->sk_cdata.sk_rx_tag,
sc_if->sk_cdata.sk_rx_sparemap);
- sc_if->sk_cdata.sk_rx_sparemap = 0;
+ sc_if->sk_cdata.sk_rx_sparemap = NULL;
}
bus_dma_tag_destroy(sc_if->sk_cdata.sk_rx_tag);
sc_if->sk_cdata.sk_rx_tag = NULL;
@@ -2308,7 +2308,7 @@ sk_dma_jumbo_free(sc_if)
sc_if->sk_rdata.sk_jumbo_rx_ring,
sc_if->sk_cdata.sk_jumbo_rx_ring_map);
sc_if->sk_rdata.sk_jumbo_rx_ring = NULL;
- sc_if->sk_cdata.sk_jumbo_rx_ring_map = 0;
+ sc_if->sk_cdata.sk_jumbo_rx_ring_map = NULL;
bus_dma_tag_destroy(sc_if->sk_cdata.sk_jumbo_rx_ring_tag);
sc_if->sk_cdata.sk_jumbo_rx_ring_tag = NULL;
}
@@ -2321,13 +2321,13 @@ sk_dma_jumbo_free(sc_if)
bus_dmamap_destroy(
sc_if->sk_cdata.sk_jumbo_rx_tag,
jrxd->rx_dmamap);
- jrxd->rx_dmamap = 0;
+ jrxd->rx_dmamap = NULL;
}
}
if (sc_if->sk_cdata.sk_jumbo_rx_sparemap) {
bus_dmamap_destroy(sc_if->sk_cdata.sk_jumbo_rx_tag,
sc_if->sk_cdata.sk_jumbo_rx_sparemap);
- sc_if->sk_cdata.sk_jumbo_rx_sparemap = 0;
+ sc_if->sk_cdata.sk_jumbo_rx_sparemap = NULL;
}
bus_dma_tag_destroy(sc_if->sk_cdata.sk_jumbo_rx_tag);
sc_if->sk_cdata.sk_jumbo_rx_tag = NULL;
OpenPOWER on IntegriCloud