diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2023-06-09 13:53:53 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2023-06-09 13:53:53 +0200 |
commit | 115ba7e0830a00a7b0bce5887c8ffeba78e3ab53 (patch) | |
tree | d376e30d5e830fc6292480203e7e39a6f9017243 /lib/io/src/win32 | |
parent | 9a4110f3c205107a3a48a0e48b760abf3cd1f3bc (diff) |
libio: remove eof flag from istream_t interface
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/io/src/win32')
-rw-r--r-- | lib/io/src/win32/istream.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/io/src/win32/istream.c b/lib/io/src/win32/istream.c index 94c8584..c4d7458 100644 --- a/lib/io/src/win32/istream.c +++ b/lib/io/src/win32/istream.c @@ -14,6 +14,7 @@ typedef struct { char *path; HANDLE hnd; + bool eof; sqfs_u8 buffer[BUFSZ]; } file_istream_t; @@ -23,7 +24,7 @@ static int file_precache(istream_t *strm) DWORD diff, actual; HANDLE hnd; - if (strm->eof) + if (file->eof) return 0; assert(strm->buffer >= file->buffer); @@ -47,7 +48,7 @@ static int file_precache(istream_t *strm) if (error == ERROR_HANDLE_EOF || error == ERROR_BROKEN_PIPE) { - strm->eof = true; + file->eof = true; break; } @@ -58,7 +59,7 @@ static int file_precache(istream_t *strm) } if (actual == 0) { - strm->eof = true; + file->eof = true; break; } |