Declare "cnt" (a number of bytes to read or write) as an "ssize_t", not

as a "long" in dofileread() and dofilewrite().

Discussed with:	jhb
This commit is contained in:
Colin Percival 2005-02-10 20:19:17 +00:00
parent 75fa96cc9b
commit e5e6a46460

View File

@ -162,7 +162,8 @@ dofileread(td, fp, fd, buf, nbyte, offset, flags)
{
struct uio auio;
struct iovec aiov;
long cnt, error = 0;
ssize_t cnt;
long error = 0;
#ifdef KTRACE
struct uio *ktruio = NULL;
#endif
@ -350,7 +351,8 @@ dofilewrite(td, fp, fd, buf, nbyte, offset, flags)
{
struct uio auio;
struct iovec aiov;
long cnt, error = 0;
ssize_t cnt;
long error = 0;
#ifdef KTRACE
struct uio *ktruio = NULL;
#endif