summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjsg <jsg@openbsd.org>2015-12-06 11:32:54 +0000
committerjsg <jsg@openbsd.org>2015-12-06 11:32:54 +0000
commitbf1fa94f0e22ea665668727a1fe8bc13652f8f99 (patch)
treea3355b5f7b2c934d7f25a8147f7723a5dcc0b62d
parentpledge "getpw" is not needed here. (diff)
downloadwireguard-openbsd-bf1fa94f0e22ea665668727a1fe8bc13652f8f99.tar.xz
wireguard-openbsd-bf1fa94f0e22ea665668727a1fe8bc13652f8f99.zip
switch on the return value of bus_dmamap_load_mbuf not value != 0
problem in rev 1.47 spotted by clang's -Wswitch-bool ok jmatthew@ kettenis@
-rw-r--r--sys/dev/pci/if_cas.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/dev/pci/if_cas.c b/sys/dev/pci/if_cas.c
index 90f1e661c89..2f773dca723 100644
--- a/sys/dev/pci/if_cas.c
+++ b/sys/dev/pci/if_cas.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_cas.c,v 1.47 2015/12/03 09:51:52 jmatthew Exp $ */
+/* $OpenBSD: if_cas.c,v 1.48 2015/12/06 11:32:54 jsg Exp $ */
/*
*
@@ -1780,8 +1780,7 @@ cas_encap(struct cas_softc *sc, struct mbuf *m, int *used)
cur = frag = (sc->sc_tx_prod + *used) % CAS_NTXDESC;
map = sc->sc_txd[cur].sd_map;
- switch (bus_dmamap_load_mbuf(sc->sc_dmatag, map, m,
- BUS_DMA_NOWAIT) != 0) {
+ switch (bus_dmamap_load_mbuf(sc->sc_dmatag, map, m, BUS_DMA_NOWAIT)) {
case 0:
break;
case EFBIG: