|
|
|
@ -81,7 +81,7 @@ local int gz_comp(state, flush) |
|
|
|
|
|
|
|
|
|
/* write directly if requested */ |
|
|
|
|
if (state->direct) { |
|
|
|
|
got = write(state->fd, strm->next_in, strm->avail_in); |
|
|
|
|
got = (int) write(state->fd, strm->next_in, strm->avail_in); |
|
|
|
|
if (got < 0 || (unsigned)got != strm->avail_in) { |
|
|
|
|
gz_error(state, Z_ERRNO, zstrerror()); |
|
|
|
|
return -1; |
|
|
|
@ -98,7 +98,7 @@ local int gz_comp(state, flush) |
|
|
|
|
if (strm->avail_out == 0 || (flush != Z_NO_FLUSH && |
|
|
|
|
(flush != Z_FINISH || ret == Z_STREAM_END))) { |
|
|
|
|
have = (unsigned)(strm->next_out - state->x.next); |
|
|
|
|
if (have && ((got = write(state->fd, state->x.next, have)) < 0 || |
|
|
|
|
if (have && ((got = (int) write(state->fd, state->x.next, have)) < 0 || |
|
|
|
|
(unsigned)got != have)) { |
|
|
|
|
gz_error(state, Z_ERRNO, zstrerror()); |
|
|
|
|
return -1; |
|
|
|
|