summaryrefslogtreecommitdiffstats
path: root/user_call/user_io.c
diff options
context:
space:
mode:
Diffstat (limited to 'user_call/user_io.c')
-rw-r--r--user_call/user_io.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/user_call/user_io.c b/user_call/user_io.c
index 0a25136..3c7e9d5 100644
--- a/user_call/user_io.c
+++ b/user_call/user_io.c
@@ -62,12 +62,13 @@ void end_compress(void)
static int flush_output(int fd, const void *buf, size_t count)
{
+ const unsigned char *byte = buf;
int cnt = count;
while (cnt > 0) {
- if (write(fd, buf, min(paclen_out, cnt)) < 0)
+ if (write(fd, byte, min(paclen_out, cnt)) < 0)
return -1;
- buf += paclen_out;
+ byte += paclen_out;
cnt -= paclen_out;
}