diff options
author | Alexander Yurchenko <grange@cvs.openbsd.org> | 2009-01-20 20:00:07 +0000 |
---|---|---|
committer | Alexander Yurchenko <grange@cvs.openbsd.org> | 2009-01-20 20:00:07 +0000 |
commit | 83860d5e6232bcb0736e5d59aa17277183b9246e (patch) | |
tree | 04dc8fe6860b2d4e22fdbe47bbe19928e2b70d02 /sys/dev/pci/cs4280.c | |
parent | 199b082eead7dda7c0f57481e944a270935477e6 (diff) |
Don't use (type *)var as an lvalue, it's incorrect. No functional changes.
ok jakemsr@ krw@
Diffstat (limited to 'sys/dev/pci/cs4280.c')
-rw-r--r-- | sys/dev/pci/cs4280.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/sys/dev/pci/cs4280.c b/sys/dev/pci/cs4280.c index a17ccf3d66a..9aee12b604d 100644 --- a/sys/dev/pci/cs4280.c +++ b/sys/dev/pci/cs4280.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cs4280.c,v 1.32 2008/10/25 22:30:43 jakemsr Exp $ */ +/* $OpenBSD: cs4280.c,v 1.33 2009/01/20 20:00:06 grange Exp $ */ /* $NetBSD: cs4280.c,v 1.5 2000/06/26 04:56:23 simonb Exp $ */ /* @@ -755,23 +755,30 @@ cs4280_intr(p) break; case CF_16BIT_MONO: for (i = 0; i < 512; i++) { - rdata = *((int16_t *)empty_dma)++>>1; - rdata += *((int16_t *)empty_dma)++>>1; - *((int16_t *)sc->sc_rn)++ = rdata; + rdata = *((int16_t *)empty_dma)>>1; + empty_dma += 2; + rdata += *((int16_t *)empty_dma)>>1; + empty_dma += 2; + *((int16_t *)sc->sc_rn) = rdata; + sc->sc_rn += 2; } break; case CF_8BIT_STEREO: for (i = 0; i < 512; i++) { - rdata = *((int16_t*)empty_dma)++; + rdata = *((int16_t*)empty_dma); + empty_dma += 2; *sc->sc_rn++ = rdata >> 8; - rdata = *((int16_t*)empty_dma)++; + rdata = *((int16_t*)empty_dma); + empty_dma += 2; *sc->sc_rn++ = rdata >> 8; } break; case CF_8BIT_MONO: for (i = 0; i < 512; i++) { - rdata = *((int16_t*)empty_dma)++ >>1; - rdata += *((int16_t*)empty_dma)++ >>1; + rdata = *((int16_t*)empty_dma) >>1; + empty_dma += 2; + rdata += *((int16_t*)empty_dma) >>1; + empty_dma += 2; *sc->sc_rn++ = rdata >>8; } break; |