diff options
author | Magnus Hagander <magnus@hagander.net> | 2017-04-12 13:43:59 +0200 |
---|---|---|
committer | Magnus Hagander <magnus@hagander.net> | 2017-04-12 13:46:38 +0200 |
commit | b935eb7da37254a18c48acc7b07517c8dfbb2339 (patch) | |
tree | ddd83d540271276e3aad3a7ff72c47c945572a47 /src/bin/pg_basebackup/walmethods.c | |
parent | 587d62d8562d658a2a9be60bc4574b6f9e592cb1 (diff) |
Fix reversed check of return value from sync
While at it also update the comments in walmethods.h to make it less
likely for mistakes like this to appear in the future (thanks to Tom for
improvements to the comments).
And finally, in passing change the return type of walmethod.getlasterror
to being const, also per suggestion from Tom.
Diffstat (limited to 'src/bin/pg_basebackup/walmethods.c')
-rw-r--r-- | src/bin/pg_basebackup/walmethods.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bin/pg_basebackup/walmethods.c b/src/bin/pg_basebackup/walmethods.c index d9ad596bf06..d4de8ddcf78 100644 --- a/src/bin/pg_basebackup/walmethods.c +++ b/src/bin/pg_basebackup/walmethods.c @@ -61,7 +61,7 @@ typedef struct DirectoryMethodFile #endif } DirectoryMethodFile; -static char * +static const char * dir_getlasterror(void) { /* Directory method always sets errno, so just use strerror */ @@ -406,7 +406,7 @@ static TarMethodData *tar_data = NULL; #define tar_clear_error() tar_data->lasterror[0] = '\0' #define tar_set_error(msg) strlcpy(tar_data->lasterror, msg, sizeof(tar_data->lasterror)) -static char * +static const char * tar_getlasterror(void) { /* |