Fix write_lseek prototype and avoid using void in arithmetic warning.

This commit is contained in:
Milan Broz
2016-01-03 16:05:17 +01:00
parent 9ce5dd1082
commit 229497871d
2 changed files with 4 additions and 4 deletions

View File

@@ -224,7 +224,7 @@ out:
* is implicitly included in the read/write offset, which can not be set to non-aligned
* boundaries. Hence, we combine llseek with write.
*/
ssize_t write_lseek_blockwise(int fd, int bsize, char *buf, size_t count, off_t offset)
ssize_t write_lseek_blockwise(int fd, int bsize, void *buf, size_t count, off_t offset)
{
char *frontPadBuf;
void *frontPadBuf_base = NULL;
@@ -263,7 +263,7 @@ ssize_t write_lseek_blockwise(int fd, int bsize, char *buf, size_t count, off_t
if (r < 0 || r != bsize)
goto out;
buf += innerCount;
buf = (char*)buf + innerCount;
count -= innerCount;
}
@@ -309,7 +309,7 @@ ssize_t read_lseek_blockwise(int fd, int bsize, void *buf, size_t count, off_t o
memcpy(buf, frontPadBuf + frontHang, innerCount);
buf += innerCount;
buf = (char*)buf + innerCount;
count -= innerCount;
}