summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Voutila <dv@cvs.openbsd.org>2022-03-07 18:52:17 +0000
committerDave Voutila <dv@cvs.openbsd.org>2022-03-07 18:52:17 +0000
commitc4536861767dcb4eb4da9df45c857dc9bf0375e8 (patch)
treef8cf3e692d33227069c42c53e89e83113c6780b9
parentde6fecd78ac462d3684037fbc38b938351ef55de (diff)
vio(4): use NULL instead of 0 with sc_{rx,tx}_mbuf pointer array.
ok millert@, deraadt@
-rw-r--r--sys/dev/pv/if_vio.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/pv/if_vio.c b/sys/dev/pv/if_vio.c
index 23d91ed1076..be53ccaf7c3 100644
--- a/sys/dev/pv/if_vio.c
+++ b/sys/dev/pv/if_vio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_vio.c,v 1.21 2022/01/09 05:42:58 jsg Exp $ */
+/* $OpenBSD: if_vio.c,v 1.22 2022/03/07 18:52:16 dv Exp $ */
/*
* Copyright (c) 2012 Stefan Fritsch, Alexander Fiveg.
@@ -913,7 +913,7 @@ vio_add_rx_mbuf(struct vio_softc *sc, int i)
m, BUS_DMA_READ|BUS_DMA_NOWAIT);
if (r) {
m_freem(m);
- sc->sc_rx_mbufs[i] = 0;
+ sc->sc_rx_mbufs[i] = NULL;
return r;
}
@@ -1146,7 +1146,7 @@ vio_txeof(struct virtqueue *vq)
BUS_DMASYNC_POSTWRITE);
m = sc->sc_tx_mbufs[slot];
bus_dmamap_unload(vsc->sc_dmat, sc->sc_tx_dmamaps[slot]);
- sc->sc_tx_mbufs[slot] = 0;
+ sc->sc_tx_mbufs[slot] = NULL;
virtio_dequeue_commit(vq, slot);
m_freem(m);
}