diff options
author | eivind <eivind@FreeBSD.org> | 1998-12-09 02:06:27 +0000 |
---|---|---|
committer | eivind <eivind@FreeBSD.org> | 1998-12-09 02:06:27 +0000 |
commit | c1d9b8bf7a01b3ab96934133b7b01707f09c65d5 (patch) | |
tree | b25fecf75f3faf1c4c0e477fde4ce493af6ed8f9 /sys/ufs | |
parent | 95121431dd9f7e1433e78d13a04345dcf46ff7d3 (diff) | |
download | FreeBSD-src-c1d9b8bf7a01b3ab96934133b7b01707f09c65d5.zip FreeBSD-src-c1d9b8bf7a01b3ab96934133b7b01707f09c65d5.tar.gz |
Make compare correct with unsigned types. (Problem introduced by Lite/2).
Diffstat (limited to 'sys/ufs')
-rw-r--r-- | sys/ufs/ufs/ufs_vnops.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c index 11592f9..de68d42 100644 --- a/sys/ufs/ufs/ufs_vnops.c +++ b/sys/ufs/ufs/ufs_vnops.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)ufs_vnops.c 8.27 (Berkeley) 5/27/95 - * $Id: ufs_vnops.c,v 1.99 1998/08/12 21:42:54 msmith Exp $ + * $Id: ufs_vnops.c,v 1.100 1998/09/30 00:53:40 mckusick Exp $ */ #include "opt_quota.h" @@ -1612,9 +1612,9 @@ ufs_readdir(ap) off = uio->uio_offset; count = uio->uio_resid; /* Make sure we don't return partial entries. */ - count -= (uio->uio_offset + count) & (DIRBLKSIZ -1); - if (count <= 0) + if (count <= ((uio->uio_offset + count) & (DIRBLKSIZ -1))) return (EINVAL); + count -= (uio->uio_offset + count) & (DIRBLKSIZ -1); lost = uio->uio_resid - count; uio->uio_resid = count; uio->uio_iov->iov_len = count; |