Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5e8e794

Browse files
committed
Focus on ftello result < 0 instead of errno
Rather than reset errno (or just hope that its cleared already),check just the result of the ftello for < 0 to determine if therewas an issue.Oversight by me, pointed out by Tom.
1 parent8198a32 commit5e8e794

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

‎src/bin/pg_dump/pg_backup_custom.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,7 @@ _CloseArchive(ArchiveHandle *AH)
708708
{
709709
WriteHead(AH);
710710
tpos=ftello(AH->FH);
711-
if (tpos<0||errno)
711+
if (tpos<0)
712712
exit_horribly(modulename,"could not determine seek position in archive file: %s\n",
713713
strerror(errno));
714714
WriteToc(AH);
@@ -757,9 +757,8 @@ _ReopenArchive(ArchiveHandle *AH)
757757
if (!ctx->hasSeek)
758758
exit_horribly(modulename,"parallel restore from non-seekable file is not supported\n");
759759

760-
errno=0;
761760
tpos=ftello(AH->FH);
762-
if (tpos<0||errno)
761+
if (tpos<0)
763762
exit_horribly(modulename,"could not determine seek position in archive file: %s\n",
764763
strerror(errno));
765764

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp