igzip: Fix feof usage in examples

Change-Id: Ic5f2f3cf62c57b685be6bc4f68a8c8e246452023
Signed-off-by: Greg Tucker <greg.b.tucker@intel.com>
This commit is contained in:
Greg Tucker 2016-11-18 16:29:41 -07:00
parent dfa4fd0940
commit 077b31b560
2 changed files with 2 additions and 2 deletions

View File

@ -64,7 +64,7 @@ int main(int argc, char *argv[])
do {
stream.avail_in = (uint32_t) fread(inbuf, 1, BUF_SIZE, in);
stream.end_of_stream = feof(in);
stream.end_of_stream = feof(in) ? 1 : 0;
stream.next_in = inbuf;
do {
stream.avail_out = BUF_SIZE;

View File

@ -66,7 +66,7 @@ int main(int argc, char *argv[])
do {
if (stream.internal_state.state == ZSTATE_NEW_HDR) {
stream.avail_in = (uint32_t) fread(inbuf, 1, BUF_SIZE, in);
stream.end_of_stream = feof(in);
stream.end_of_stream = feof(in) ? 1 : 0;
stream.next_in = inbuf;
}
do {