diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1998-08-04 21:26:36 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1998-08-04 21:26:36 +0000 |
commit | 75c1e9e69d3537bc2468fc2850b0386891926c45 (patch) | |
tree | 8fd862c7299a5af5bf899b6f8d7dc79c70aa388d /sys | |
parent | 55d0db52b5c169eb783c2bfcc82ee73fe7bf6f56 (diff) |
don't rely on b_resid being signed
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/ccd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/ccd.c b/sys/dev/ccd.c index 0b7987afe33..575b5693981 100644 --- a/sys/dev/ccd.c +++ b/sys/dev/ccd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ccd.c,v 1.35 1998/03/10 20:43:17 millert Exp $ */ +/* $OpenBSD: ccd.c,v 1.36 1998/08/04 21:26:35 millert Exp $ */ /* $NetBSD: ccd.c,v 1.33 1996/05/05 04:21:14 thorpej Exp $ */ /*- @@ -1098,9 +1098,9 @@ ccdiodone(vbp) * Note that mirror component buffers aren't counted against * the original I/O buffer. */ - bp->b_resid -= count; - if (bp->b_resid < 0) + if (count > bp->b_resid) panic("ccdiodone: count"); + bp->b_resid -= count; if (bp->b_resid == 0) ccdintr(&ccd_softc[unit], bp); } |