sign-compare fix

This commit is contained in:
lukem 2009-02-12 05:03:47 +00:00
parent 71d48e7c9e
commit 4359ce3c5f

View File

@ -1,4 +1,4 @@
/* $NetBSD: hashhl.c,v 1.1 2005/09/28 16:31:45 christos Exp $ */
/* $NetBSD: hashhl.c,v 1.2 2009/02/12 05:03:47 lukem Exp $ */
/*
* ----------------------------------------------------------------------------
@ -109,7 +109,7 @@ FNPREFIX(FileChunk)(const char *filename, char *buf, off_t off, off_t len)
if (off > 0 && lseek(fd, off, SEEK_SET) < 0)
return (NULL);
while ((nr = read(fd, buffer, (size_t) MIN(sizeof(buffer), len)))
while ((nr = read(fd, buffer, (size_t) MIN((off_t)sizeof(buffer), len)))
> 0) {
FNPREFIX(Update)(&ctx, buffer, (unsigned int)nr);
if (len > 0 && (len -= nr) == 0)