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

Commitb436c72

Browse files
committed
Fix overly-complicated usage of errcode_for_file_access().
No need to do "errcode(errcode_for_file_access())", just"errcode_for_file_access()" is enough. The extra errcode() call is uselessbut harmless, so there's no user-visible bug here. Nevertheless, backpatchto 9.1 where this code were added.
1 parentf9c92a5 commitb436c72

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎src/backend/replication/basebackup.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,7 @@ sendDir(char *path, int basepathlen, bool sizeonly)
592592
{
593593
if (errno!=ENOENT)
594594
ereport(ERROR,
595-
(errcode(errcode_for_file_access()),
595+
(errcode_for_file_access(),
596596
errmsg("could not stat file or directory \"%s\": %m",
597597
pathbuf)));
598598

@@ -634,7 +634,7 @@ sendDir(char *path, int basepathlen, bool sizeonly)
634634
MemSet(linkpath,0,sizeof(linkpath));
635635
if (readlink(pathbuf,linkpath,sizeof(linkpath)-1)==-1)
636636
ereport(ERROR,
637-
(errcode(errcode_for_file_access()),
637+
(errcode_for_file_access(),
638638
errmsg("could not read symbolic link \"%s\": %m",
639639
pathbuf)));
640640
if (!sizeonly)
@@ -728,7 +728,7 @@ sendFile(char *readfilename, char *tarfilename, struct stat * statbuf)
728728
fp=AllocateFile(readfilename,"rb");
729729
if (fp==NULL)
730730
ereport(ERROR,
731-
(errcode(errcode_for_file_access()),
731+
(errcode_for_file_access(),
732732
errmsg("could not open file \"%s\": %m",readfilename)));
733733

734734
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp