From 87bd10564bb2497d9e6f03f12f4dd246fbcb1443 Mon Sep 17 00:00:00 2001 From: Mingjie Shen Date: Tue, 14 Nov 2023 16:00:05 -0500 Subject: [PATCH] Fix condition for error message of failing to open gzipped files gzfh should be checked, instead of fh. --- src/be.c | 2 +- 2 files changed, 1 insertions(+), 1 deletion(-) diff --git a/src/be.c b/src/be.c index 39592cd..9ddaa48 100644 --- a/src/be.c +++ b/src/be.c @@ -160,7 +160,7 @@ void* be_init(bool readonly, url_t* u, bool iszipped, bool append, int linenumbe #ifdef WITH_ZLIB if(iszipped && !readonly){ gzFile gzfh = gzdopen(a,"w"); - if(fh==NULL){ + if(gzfh==NULL){ log_msg(LOG_LEVEL_ERROR,"couldn't reopen file descriptor %li",a); } return gzfh; -- 2.33.0