1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-14 10:09:48 +00:00

Make compare correct with unsigned types. (Problem introduced by Lite/2).

This commit is contained in:
Eivind Eklund 1998-12-09 02:06:27 +00:00
parent cd0f360aeb
commit bf51e54f46
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=41610

View File

@ -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;