mirror of
https://github.com/postgres/postgres.git
synced 2025-05-05 09:19:17 +03:00
pg_dump: Replace can't-happen error with assertion
This commit is contained in:
parent
641b76d9d1
commit
d51f704fd8
@ -515,6 +515,8 @@ _tarReadRaw(ArchiveHandle *AH, void *buf, size_t len, TAR_MEMBER *th, FILE *fh)
|
|||||||
size_t used = 0;
|
size_t used = 0;
|
||||||
size_t res = 0;
|
size_t res = 0;
|
||||||
|
|
||||||
|
Assert(th || fh);
|
||||||
|
|
||||||
avail = AH->lookaheadLen - AH->lookaheadPos;
|
avail = AH->lookaheadLen - AH->lookaheadPos;
|
||||||
if (avail > 0)
|
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);
|
READ_ERROR_EXIT(th->nFH);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
fatal("internal error -- neither th nor fh specified in _tarReadRaw()");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx->tarFHpos += res + used;
|
ctx->tarFHpos += res + used;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user