diff options
| -rw-r--r-- | gzread.c | 4 | ||||
| -rw-r--r-- | gzwrite.c | 2 |
2 files changed, 3 insertions, 3 deletions
| @@ -302,7 +302,7 @@ int ZEXPORT gzread(file, buf, len) | |||
| 302 | /* since an int is returned, make sure len fits in one, otherwise return | 302 | /* since an int is returned, make sure len fits in one, otherwise return |
| 303 | with an error (this avoids the flaw in the interface) */ | 303 | with an error (this avoids the flaw in the interface) */ |
| 304 | if ((int)len < 0) { | 304 | if ((int)len < 0) { |
| 305 | gz_error(state, Z_BUF_ERROR, "requested length does not fit in int"); | 305 | gz_error(state, Z_DATA_ERROR, "requested length does not fit in int"); |
| 306 | return -1; | 306 | return -1; |
| 307 | } | 307 | } |
| 308 | 308 | ||
| @@ -445,7 +445,7 @@ int ZEXPORT gzungetc(c, file) | |||
| 445 | 445 | ||
| 446 | /* if no room, give up (must have already done a gzungetc()) */ | 446 | /* if no room, give up (must have already done a gzungetc()) */ |
| 447 | if (state->x.have == (state->size << 1)) { | 447 | if (state->x.have == (state->size << 1)) { |
| 448 | gz_error(state, Z_BUF_ERROR, "out of room to push characters"); | 448 | gz_error(state, Z_DATA_ERROR, "out of room to push characters"); |
| 449 | return -1; | 449 | return -1; |
| 450 | } | 450 | } |
| 451 | 451 | ||
| @@ -185,7 +185,7 @@ int ZEXPORT gzwrite(file, buf, len) | |||
| 185 | /* since an int is returned, make sure len fits in one, otherwise return | 185 | /* since an int is returned, make sure len fits in one, otherwise return |
| 186 | with an error (this avoids the flaw in the interface) */ | 186 | with an error (this avoids the flaw in the interface) */ |
| 187 | if ((int)len < 0) { | 187 | if ((int)len < 0) { |
| 188 | gz_error(state, Z_BUF_ERROR, "requested length does not fit in int"); | 188 | gz_error(state, Z_DATA_ERROR, "requested length does not fit in int"); |
| 189 | return 0; | 189 | return 0; |
| 190 | } | 190 | } |
| 191 | 191 | ||
