diff options
author | peter <peter@FreeBSD.org> | 1996-09-27 13:50:59 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1996-09-27 13:50:59 +0000 |
commit | 860717e26f90d179bbd29bb4b6ea6ddfc1c304ba (patch) | |
tree | 64600df868d09be0f19fc042917f6ef4c5999535 /sys/dev/si | |
parent | 88c942b44621f9a7353bfa55eddf904cf36877a0 (diff) | |
download | FreeBSD-src-860717e26f90d179bbd29bb4b6ea6ddfc1c304ba.zip FreeBSD-src-860717e26f90d179bbd29bb4b6ea6ddfc1c304ba.tar.gz |
Some warning cleanups. There were some needless casts that also caused
gcc -Wcast-qual to scream. There's still quite a few left, but since I'm
cleaning out my tree, I'll commit these now.
Diffstat (limited to 'sys/dev/si')
-rw-r--r-- | sys/dev/si/si.c | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/sys/dev/si/si.c b/sys/dev/si/si.c index 369d57d..81d8026 100644 --- a/sys/dev/si/si.c +++ b/sys/dev/si/si.c @@ -30,7 +30,7 @@ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN * NO EVENT SHALL THE AUTHORS BE LIABLE. * - * $Id: si.c,v 1.51 1996/08/12 17:12:07 peter Exp $ + * $Id: si.c,v 1.52 1996/09/06 23:08:03 phk Exp $ */ #ifndef lint @@ -391,10 +391,10 @@ got_card: DPRINT((0, DBG_AUTOBOOT, "si%d: found type %d card, try memory test\n", id->id_unit, type)); /* Try the acid test */ - ux = (BYTE *)(maddr + SIRAM); + ux = maddr + SIRAM; for (i=0; i<ramsize; i++, ux++) *ux = (BYTE)(i&0xff); - ux = (BYTE *)(maddr + SIRAM); + ux = maddr + SIRAM; for (i=0; i<ramsize; i++, ux++) { if ((was = *ux) != (BYTE)(i&0xff)) { DPRINT((0, DBG_AUTOBOOT|DBG_FAIL, @@ -405,10 +405,10 @@ got_card: } /* clear out the RAM */ - ux = (BYTE *)(maddr + SIRAM); + ux = maddr + SIRAM; for (i=0; i<ramsize; i++) *ux++ = 0; - ux = (BYTE *)(maddr + SIRAM); + ux = maddr + SIRAM; for (i=0; i<ramsize; i++) { if ((was = *ux++) != 0) { DPRINT((0, DBG_AUTOBOOT|DBG_FAIL, @@ -710,7 +710,7 @@ siopen(dev, flag, mode, p) /* quickly let in /dev/si_control */ if (IS_CONTROLDEV(mynor)) { - if (error = suser(p->p_ucred, &p->p_acflag)) + if ((error = suser(p->p_ucred, &p->p_acflag))) return(error); return(0); } @@ -941,9 +941,9 @@ sihardclose(pp) tp = pp->sp_tty; ccbp = pp->sp_ccb; /* Find control block */ if (tp->t_cflag & HUPCL - || !pp->sp_active_out - && !(ccbp->hi_ip & IP_DCD) - && !(pp->sp_iin.c_cflag && CLOCAL) + || (!pp->sp_active_out + && !(ccbp->hi_ip & IP_DCD) + && !(pp->sp_iin.c_cflag && CLOCAL)) || !(tp->t_state & TS_ISOPEN)) { (void) si_modem(pp, BIC, TIOCM_DTR|TIOCM_RTS); @@ -1032,8 +1032,8 @@ siwrite(dev, uio, flag) while (pp->sp_state & SS_BLOCKWRITE) { pp->sp_state |= SS_WAITWRITE; DPRINT((pp, DBG_WRITE, "in siwrite, wait for SS_BLOCKWRITE to clear\n")); - if (error = ttysleep(tp, (caddr_t)pp, TTOPRI|PCATCH, - "siwrite", tp->t_timeout)) { + if ((error = ttysleep(tp, (caddr_t)pp, TTOPRI|PCATCH, + "siwrite", tp->t_timeout))) { if (error == EWOULDBLOCK) error = EIO; goto out; @@ -1270,7 +1270,7 @@ si_Sioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p) ip = (int *)data; -#define SUCHECK if (error = suser(p->p_ucred, &p->p_acflag)) goto out +#define SUCHECK if ((error = suser(p->p_ucred, &p->p_acflag))) goto out switch (cmd) { case TCSIPORTS: @@ -2024,7 +2024,6 @@ si_start(tp) struct si_port *pp; volatile struct si_channel *ccbp; register struct clist *qp; - register char *dptr; BYTE ipos; int nchar; int oldspl, count, n, amount, buffer_full; @@ -2058,8 +2057,6 @@ si_start(tp) count = (int)ccbp->hi_txipos - (int)ccbp->hi_txopos; DPRINT((pp, DBG_START, "count %d\n", (BYTE)count)); - dptr = (char *)ccbp->hi_txbuf; /* data buffer */ - while ((nchar = qp->c_cc) > 0) { if ((BYTE)count >= 255) { buffer_full++; |