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:
parent
81e08ae466
commit
1ea4458dda
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user