summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa/tw.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1999-05-06 18:44:42 +0000
committerpeter <peter@FreeBSD.org>1999-05-06 18:44:42 +0000
commit459d4a2cc5e6111860f2c6a86117a230d98dd4e9 (patch)
tree3ebec15b9f996d9b97c11ef575d325c41cea11f1 /sys/i386/isa/tw.c
parentdaa969b0667e983bbabc44c8ddcda321b70523c5 (diff)
downloadFreeBSD-src-459d4a2cc5e6111860f2c6a86117a230d98dd4e9.zip
FreeBSD-src-459d4a2cc5e6111860f2c6a86117a230d98dd4e9.tar.gz
Fix up a few easy 'assignment used as truth value' and 'suggest parens
around && within ||' type warnings. I'm pretty sure I have not masked any problems here, I've committed real problem fixes seperately.
Diffstat (limited to 'sys/i386/isa/tw.c')
-rw-r--r--sys/i386/isa/tw.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/i386/isa/tw.c b/sys/i386/isa/tw.c
index 0fb02ed..3b7b176 100644
--- a/sys/i386/isa/tw.c
+++ b/sys/i386/isa/tw.c
@@ -481,7 +481,8 @@ int twwrite(dev, uio, ioflag)
*/
s = spltty();
cnt = MIN(3 - sc->sc_pktsize, uio->uio_resid);
- if(error = uiomove(&(sc->sc_pkt[sc->sc_pktsize]), cnt, uio)) {
+ error = uiomove(&(sc->sc_pkt[sc->sc_pktsize]), cnt, uio);
+ if(error) {
splx(s);
return(error);
}
@@ -509,7 +510,8 @@ int twwrite(dev, uio, ioflag)
* originated locally.
*/
while(sc->sc_state & (TWS_RCVING | TWS_XMITTING)) {
- if(error = tsleep((caddr_t)sc, TWPRI|PCATCH, "twwrite", 0)) {
+ error = tsleep((caddr_t)sc, TWPRI|PCATCH, "twwrite", 0);
+ if(error) {
splx(s);
return(error);
}
@@ -860,7 +862,8 @@ int cnt;
while(cnt--) {
while(sc->sc_nextin == sc->sc_nextout) { /* Buffer empty */
sc->sc_state |= TWS_WANT;
- if(error = tsleep((caddr_t)(&sc->sc_buf), TWPRI|PCATCH, "twread", 0)) {
+ error = tsleep((caddr_t)(&sc->sc_buf), TWPRI|PCATCH, "twread", 0);
+ if(error) {
return(error);
}
}
OpenPOWER on IntegriCloud