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:
Conrad Meyer 2017-06-27 17:23:20 +00:00
parent 69a3d9e7dc
commit f5b7359a00
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=320415

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;