Fixed two warnings, dunno why they slipped through the other time.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6599 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2004-02-15 18:58:41 +00:00
parent 81e08ae466
commit 1ea4458dda

View File

@ -414,15 +414,16 @@ flo_read(floppy_cookie *cookie, off_t position, void *data, size_t *numbytes)
*numbytes = 0;
return err;
}
toread = MIN(len, sectsize);
toread = MIN(len, (size_t)sectsize);
toread = MIN(toread, sectsize - (position % sectsize));
memcpy(data, cookie->flp->master->buffer + position % cylsize/*(sectsize * ) + (position % sectsize)*/, toread);
len -= toread;
bytes_read += toread;
position += toread;
}
// read the middle blocks
while (len >= sectsize) {
while (len >= (size_t)sectsize) {
TRACE("read: middle %Ld, %ld, %ld\n", position, bytes_read, len);
// try to read as many sectors as we can