From bbfd430cf96613308775370be147d825ed3ee453 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Tue, 9 Feb 2021 18:25:03 -0700 Subject: [PATCH] feof(3) returns non-zero at EOF, not necessarily 1. On Illumos at least it returns a value other than 1. --- lib/iolog/iolog_fileio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/iolog/iolog_fileio.c b/lib/iolog/iolog_fileio.c index 84aeaa85b..e8957efaf 100644 --- a/lib/iolog/iolog_fileio.c +++ b/lib/iolog/iolog_fileio.c @@ -827,10 +827,10 @@ iolog_eof(struct iolog_file *iol) #ifdef HAVE_ZLIB_H if (iol->compressed) - ret = gzeof(iol->fd.g) == 1; + ret = gzeof(iol->fd.g) != 0; else #endif - ret = feof(iol->fd.f) == 1; + ret = feof(iol->fd.f) != 0; debug_return_int(ret); }