Fix one more place uio_resid is truncated to int

A follow-up to r231949 and r194990.

Reported by:	pho@
Reviewed by:	kib@, markj@
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D11373
This commit is contained in:
cem 2017-06-27 17:23:20 +00:00
parent 8441709549
commit 3521ec05c1

View File

@ -1517,7 +1517,7 @@ m_uiotombuf(struct uio *uio, int how, int len, int align, int flags)
* the total data supplied by the uio.
*/
if (len > 0)
total = min(uio->uio_resid, len);
total = (uio->uio_resid < len) ? uio->uio_resid : len;
else
total = uio->uio_resid;