From: miod Date: Fri, 6 Aug 2010 00:00:16 +0000 (+0000) Subject: don't return (potential errno) + (potential errno), instead only perform X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=20cd04e4447b62ff5075f20f04bd279c94a0a7a8;p=openbsd don't return (potential errno) + (potential errno), instead only perform the second errno-capable function if the first one didn't fail. ok deraadt@ --- 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);