Eliminate unnecessary goto and labels, and other minor cleanup.

This commit is contained in:
scottr 1996-01-23 00:28:09 +00:00
parent 93542f4a98
commit f9418ec605
1 changed files with 14 additions and 17 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: ct.c,v 1.13 1995/12/02 18:21:52 thorpej Exp $ */
/* $NetBSD: ct.c,v 1.14 1996/01/23 00:28:09 scottr Exp $ */
/*
* Copyright (c) 1982, 1990, 1993
@ -380,7 +380,8 @@ ctcommand(dev, cmd, cnt)
bp->b_un.b_addr = nbp->b_un.b_addr;
bp->b_bcount = MAXBSIZE;
}
again:
while (cnt-- > 0) {
bp->b_flags = B_BUSY;
if (cmd == MTBSF) {
sc->sc_blkno = sc->sc_eofs[sc->sc_eofp];
@ -394,8 +395,7 @@ again:
}
ctstrategy(bp);
iowait(bp);
if (--cnt > 0)
goto again;
}
bp->b_flags = 0;
sc->sc_flags &= ~CTF_CMD;
if (nbp)
@ -444,7 +444,6 @@ ctstart(unit)
register int i;
bp = cttab[unit].b_actf;
again:
if ((sc->sc_flags & CTF_CMD) && sc->sc_bp == bp) {
switch(sc->sc_cmd) {
@ -804,7 +803,6 @@ ctread(dev, uio, flags)
struct uio *uio;
int flags;
{
return (physio(ctstrategy, NULL, dev, B_READ, minphys, uio));
}
@ -814,7 +812,6 @@ ctwrite(dev, uio, flags)
struct uio *uio;
int flags;
{
/* XXX: check for hardware write-protect? */
return (physio(ctstrategy, NULL, dev, B_WRITE, minphys, uio));
}