summaryrefslogtreecommitdiff
path: root/gzlib.c
diff options
context:
space:
mode:
Diffstat (limited to 'gzlib.c')
-rw-r--r--gzlib.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gzlib.c b/gzlib.c
index 15999ae..d1b6253 100644
--- a/gzlib.c
+++ b/gzlib.c
@@ -5,7 +5,7 @@
5 5
6#include "gzguts.h" 6#include "gzguts.h"
7 7
8#if _LARGEFILE64_SOURCE == 1 && _LFS64_LARGEFILE == 1 8#if _LARGEFILE64_SOURCE && _LFS64_LARGEFILE
9# define LSEEK lseek64 9# define LSEEK lseek64
10#else 10#else
11# define LSEEK lseek 11# define LSEEK lseek
@@ -172,6 +172,7 @@ local gzFile gz_open(path, fd, mode)
172 O_APPEND))), 172 O_APPEND))),
173 0666); 173 0666);
174 if (state->fd == -1) { 174 if (state->fd == -1) {
175 free(state->path);
175 free(state); 176 free(state);
176 return NULL; 177 return NULL;
177 } 178 }
@@ -432,7 +433,8 @@ int ZEXPORT gzeof(file)
432 return 0; 433 return 0;
433 434
434 /* return end-of-file state */ 435 /* return end-of-file state */
435 return state->mode == GZ_READ ? (state->eof && state->have == 0) : 0; 436 return state->mode == GZ_READ ?
437 (state->eof && state->strm.avail_in == 0 && state->have == 0) : 0;
436} 438}
437 439
438/* -- see zlib.h -- */ 440/* -- see zlib.h -- */