diff options
author | Mark Adler <madler@alumni.caltech.edu> | 2016-10-11 22:15:50 -0700 |
---|---|---|
committer | Mark Adler <madler@alumni.caltech.edu> | 2016-10-11 22:15:50 -0700 |
commit | 7096424f23df1b1813237fb5f8bc8f34cfcedd0c (patch) | |
tree | c41e8ef447e7e6764be5f3ba822fdc0c8da049f1 /gzread.c | |
parent | 2edb94a3025d288dc251bc6cbb2c02e60fbd7438 (diff) | |
download | zlib-7096424f23df1b1813237fb5f8bc8f34cfcedd0c.tar.gz zlib-7096424f23df1b1813237fb5f8bc8f34cfcedd0c.tar.bz2 zlib-7096424f23df1b1813237fb5f8bc8f34cfcedd0c.zip |
Clean up type conversions.
Diffstat (limited to 'gzread.c')
-rw-r--r-- | gzread.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -23,14 +23,14 @@ local int gz_load(state, buf, len, have) | |||
23 | unsigned len; | 23 | unsigned len; |
24 | unsigned *have; | 24 | unsigned *have; |
25 | { | 25 | { |
26 | int ret; | 26 | ssize_t ret; |
27 | 27 | ||
28 | *have = 0; | 28 | *have = 0; |
29 | do { | 29 | do { |
30 | ret = read(state->fd, buf + *have, len - *have); | 30 | ret = read(state->fd, buf + *have, len - *have); |
31 | if (ret <= 0) | 31 | if (ret <= 0) |
32 | break; | 32 | break; |
33 | *have += ret; | 33 | *have += (unsigned)ret; |
34 | } while (*have < len); | 34 | } while (*have < len); |
35 | if (ret < 0) { | 35 | if (ret < 0) { |
36 | gz_error(state, Z_ERRNO, zstrerror()); | 36 | gz_error(state, Z_ERRNO, zstrerror()); |
@@ -451,7 +451,7 @@ int ZEXPORT gzungetc(c, file) | |||
451 | if (state->x.have == 0) { | 451 | if (state->x.have == 0) { |
452 | state->x.have = 1; | 452 | state->x.have = 1; |
453 | state->x.next = state->out + (state->size << 1) - 1; | 453 | state->x.next = state->out + (state->size << 1) - 1; |
454 | state->x.next[0] = c; | 454 | state->x.next[0] = (unsigned char)c; |
455 | state->x.pos--; | 455 | state->x.pos--; |
456 | state->past = 0; | 456 | state->past = 0; |
457 | return c; | 457 | return c; |
@@ -473,7 +473,7 @@ int ZEXPORT gzungetc(c, file) | |||
473 | } | 473 | } |
474 | state->x.have++; | 474 | state->x.have++; |
475 | state->x.next--; | 475 | state->x.next--; |
476 | state->x.next[0] = c; | 476 | state->x.next[0] = (unsigned char)c; |
477 | state->x.pos--; | 477 | state->x.pos--; |
478 | state->past = 0; | 478 | state->past = 0; |
479 | return c; | 479 | return c; |