summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_cas.c
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2015-12-06 11:32:55 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2015-12-06 11:32:55 +0000
commit2afbf18d2bfd221085175f6c8590b2b245ff53a0 (patch)
tree165f190501e67342274d1ee08420da1d64f01921 /sys/dev/pci/if_cas.c
parent2e498468740f5b49b3838a04e941799eb440fdb4 (diff)
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@
Diffstat (limited to 'sys/dev/pci/if_cas.c')
-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: