diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2011-10-22 20:16:05 +0300 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2011-10-22 20:22:12 +0300 |
commit | 8e8ac0894b196c4dd8618bca1f598f13bf5e18ea (patch) | |
tree | b8a7834a2c5cd8de7b7a3f82f1dbb8b14979c097 /src | |
parent | dff178f8017e4412d14f131e4c3b5f5b385c5598 (diff) | |
download | postgresql-8e8ac0894b196c4dd8618bca1f598f13bf5e18ea.tar.gz postgresql-8e8ac0894b196c4dd8618bca1f598f13bf5e18ea.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')
-rw-r--r-- | src/backend/replication/basebackup.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/replication/basebackup.c b/src/backend/replication/basebackup.c index 231a1de2f5e..d6ed49a26fa 100644 --- a/src/backend/replication/basebackup.c +++ b/src/backend/replication/basebackup.c @@ -586,7 +586,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))); @@ -628,7 +628,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) @@ -722,7 +722,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))); /* |