From 100ff6665ddc4965d9cc4c0f2cd03d9b17a46099 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sat, 14 Jan 2023 10:31:47 -0600
Subject: [PATCH 4/7] f!

---
 src/bin/pg_dump/compress_gzip.c      | 9 +--------
 src/bin/pg_dump/pg_backup_archiver.c | 1 -
 2 files changed, 1 insertion(+), 9 deletions(-)

diff --git a/src/bin/pg_dump/compress_gzip.c b/src/bin/pg_dump/compress_gzip.c
index 37c841c5a9b..b00be32f2e9 100644
--- a/src/bin/pg_dump/compress_gzip.c
+++ b/src/bin/pg_dump/compress_gzip.c
@@ -291,17 +291,10 @@ static int
 Gzip_close(CompressFileHandle *CFH)
 {
 	gzFile		gzfp = (gzFile) CFH->private_data;
-	int			save_errno;
-	int			ret;
 
 	CFH->private_data = NULL;
 
-	ret = gzclose(gzfp);
-
-	save_errno = errno;
-	errno = save_errno;
-
-	return ret;
+	return gzclose(gzfp);
 }
 
 static int
diff --git a/src/bin/pg_dump/pg_backup_archiver.c b/src/bin/pg_dump/pg_backup_archiver.c
index 06f0b46cbfc..7f06beff61c 100644
--- a/src/bin/pg_dump/pg_backup_archiver.c
+++ b/src/bin/pg_dump/pg_backup_archiver.c
@@ -385,7 +385,6 @@ RestoreArchive(Archive *AHX)
 	 */
 	supports_compression = true;
 	if (AH->compression_spec.algorithm != PG_COMPRESSION_NONE &&
-		AH->compression_spec.algorithm == PG_COMPRESSION_GZIP &&
 		AH->PrintTocDataPtr != NULL)
 	{
 		for (te = AH->toc->next; te != AH->toc; te = te->next)
-- 
2.25.1

