From: guenther Date: Mon, 11 May 2015 02:01:01 +0000 (+0000) Subject: Convert from uiomovei() to uiomove() to prevent short tranfers X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=2d4d9177b5c522dd2b13e07e3bcf0638653a08fa;p=openbsd Convert from uiomovei() to uiomove() to prevent short tranfers diff from natano@bitrig --- diff --git a/sys/dev/ic/lpt.c b/sys/dev/ic/lpt.c index abe25e8d072..39085534c7c 100644 --- a/sys/dev/ic/lpt.c +++ b/sys/dev/ic/lpt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lpt.c,v 1.13 2015/02/10 21:56:09 miod Exp $ */ +/* $OpenBSD: lpt.c,v 1.14 2015/05/11 02:01:01 guenther Exp $ */ /* $NetBSD: lpt.c,v 1.42 1996/10/21 22:41:14 thorpej Exp $ */ /* @@ -367,8 +367,8 @@ lptwrite(dev_t dev, struct uio *uio, int flags) size_t n; int error = 0; - while ((n = min(LPT_BSIZE, uio->uio_resid)) != 0) { - error = uiomovei(sc->sc_cp = sc->sc_inbuf->b_data, n, uio); + while ((n = ulmin(LPT_BSIZE, uio->uio_resid)) != 0) { + error = uiomove(sc->sc_cp = sc->sc_inbuf->b_data, n, uio); if (error != 0) return error; sc->sc_count = n;