mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-05 16:00:05 +01:00
Fix write_lseek prototype and avoid using void in arithmetic warning.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user