From 115ba7e0830a00a7b0bce5887c8ffeba78e3ab53 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Fri, 9 Jun 2023 13:53:53 +0200 Subject: libio: remove eof flag from istream_t interface Signed-off-by: David Oberhollenzer --- lib/io/src/win32/istream.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib/io/src/win32/istream.c') 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; } -- cgit v1.2.3