git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 641b76d)
pg_dump: Replace can't-happen error with assertion
2020年4月27日 12:24:20 +0000 (14:24 +0200)
2020年4月27日 12:24:20 +0000 (14:24 +0200)

diff --git a/src/bin/pg_dump/pg_backup_tar.c b/src/bin/pg_dump/pg_backup_tar.c
index 775118f2978072fdec58c33bf9f463cefacc0ab4..d5bfa5564615207c544b8e2a0675c166ccb63277 100644 (file)
--- a/src/bin/pg_dump/pg_backup_tar.c
+++ b/src/bin/pg_dump/pg_backup_tar.c
@@ -515,6 +515,8 @@ _tarReadRaw(ArchiveHandle *AH, void *buf, size_t len, TAR_MEMBER *th, FILE *fh)
size_t used = 0;
size_t res = 0;
+ Assert(th || fh);
+
avail = AH->lookaheadLen - AH->lookaheadPos;
if (avail > 0)
{
@@ -567,8 +569,6 @@ _tarReadRaw(ArchiveHandle *AH, void *buf, size_t len, TAR_MEMBER *th, FILE *fh)
READ_ERROR_EXIT(th->nFH);
}
}
- else
- fatal("internal error -- neither th nor fh specified in _tarReadRaw()");
}
ctx->tarFHpos += res + used;
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /