diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2010-08-06 00:00:17 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2010-08-06 00:00:17 +0000 |
commit | 74941a3857b470a833f212ed267662d23f68edea (patch) | |
tree | 554cdc2c0f98f224f278aa3cd331d31052f46fbf | |
parent | 9e0b4b3e9aeb4e74a5149a2b146bc2b273b0b3fd (diff) |
don't return (potential errno) + (potential errno), instead only perform
the second errno-capable function if the first one didn't fail.
ok deraadt@
-rw-r--r-- | sys/dev/pci/bktr/bktr_core.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/pci/bktr/bktr_core.c b/sys/dev/pci/bktr/bktr_core.c index 11c5da0b264..2f32c0ceb55 100644 --- a/sys/dev/pci/bktr/bktr_core.c +++ b/sys/dev/pci/bktr/bktr_core.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bktr_core.c,v 1.28 2009/11/09 17:53:39 nicm Exp $ */ +/* $OpenBSD: bktr_core.c,v 1.29 2010/08/06 00:00:16 miod Exp $ */ /* $FreeBSD: src/sys/dev/bktr/bktr_core.c,v 1.114 2000/10/31 13:09:56 roger Exp $ */ /* @@ -1077,7 +1077,8 @@ vbi_read(bktr_ptr_t bktr, struct uio *uio, int ioflag) readsize2 = VBI_BUFFER_SIZE - bktr->vbistart; status = uiomove((caddr_t)bktr->vbibuffer + bktr->vbistart, readsize2, uio); - status += uiomove((caddr_t)bktr->vbibuffer, (readsize - readsize2), uio); + if (status == 0) + status = uiomove((caddr_t)bktr->vbibuffer, (readsize - readsize2), uio); } else { /* We do not need to wrap around */ status = uiomove((caddr_t)bktr->vbibuffer + bktr->vbistart, readsize, uio); |