From: dv Date: Mon, 7 Mar 2022 18:52:16 +0000 (+0000) Subject: vio(4): use NULL instead of 0 with sc_{rx,tx}_mbuf pointer array. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=527beed4380e88d5252ae4894af6943175166dbb;p=openbsd vio(4): use NULL instead of 0 with sc_{rx,tx}_mbuf pointer array. ok millert@, deraadt@ --- 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); }