aboutsummaryrefslogtreecommitdiff
path: root/src/backend/replication/basebackup.c
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2011-10-22 20:16:05 +0300
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2011-10-22 20:19:50 +0300
commitb436c72f61adf5efab435c282bfb13a29508d475 (patch)
tree55ae0fab97e4b361ac5827d2c558f0b7a48426f1 /src/backend/replication/basebackup.c
parentf9c92a5a3ead738c7de0dffa203a92b4d2fec413 (diff)
downloadpostgresql-b436c72f61adf5efab435c282bfb13a29508d475.tar.gz
postgresql-b436c72f61adf5efab435c282bfb13a29508d475.zip
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 useless but harmless, so there's no user-visible bug here. Nevertheless, backpatch to 9.1 where this code were added.
Diffstat (limited to 'src/backend/replication/basebackup.c')
-rw-r--r--src/backend/replication/basebackup.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/replication/basebackup.c b/src/backend/replication/basebackup.c
index 20d4ce36d88..ba52ea8e989 100644
--- a/src/backend/replication/basebackup.c
+++ b/src/backend/replication/basebackup.c
@@ -592,7 +592,7 @@ sendDir(char *path, int basepathlen, bool sizeonly)
{
if (errno != ENOENT)
ereport(ERROR,
- (errcode(errcode_for_file_access()),
+ (errcode_for_file_access(),
errmsg("could not stat file or directory \"%s\": %m",
pathbuf)));
@@ -634,7 +634,7 @@ sendDir(char *path, int basepathlen, bool sizeonly)
MemSet(linkpath, 0, sizeof(linkpath));
if (readlink(pathbuf, linkpath, sizeof(linkpath) - 1) == -1)
ereport(ERROR,
- (errcode(errcode_for_file_access()),
+ (errcode_for_file_access(),
errmsg("could not read symbolic link \"%s\": %m",
pathbuf)));
if (!sizeonly)
@@ -728,7 +728,7 @@ sendFile(char *readfilename, char *tarfilename, struct stat * statbuf)
fp = AllocateFile(readfilename, "rb");
if (fp == NULL)
ereport(ERROR,
- (errcode(errcode_for_file_access()),
+ (errcode_for_file_access(),
errmsg("could not open file \"%s\": %m", readfilename)));
/*