Commit 22949787 authored by Milan Broz's avatar Milan Broz

Fix write_lseek prototype and avoid using void in arithmetic warning.

parent 9ce5dd10
......@@ -102,7 +102,7 @@ ssize_t write_buffer(int fd, const void *buf, size_t count);
ssize_t read_buffer(int fd, void *buf, size_t count);
ssize_t write_blockwise(int fd, int bsize, void *buf, size_t count);
ssize_t read_blockwise(int fd, int bsize, void *buf, size_t count);
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);
ssize_t read_lseek_blockwise(int fd, int bsize, void *buf, size_t count, off_t offset);
unsigned crypt_getpagesize(void);
......
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment