diff options
Diffstat (limited to 'src/common/controldata_utils.c')
-rw-r--r-- | src/common/controldata_utils.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/common/controldata_utils.c b/src/common/controldata_utils.c index 2c28e51e111..39c27c92292 100644 --- a/src/common/controldata_utils.c +++ b/src/common/controldata_utils.c @@ -106,13 +106,13 @@ get_controlfile(const char *DataDir, bool *crc_ok_p) } #ifndef FRONTEND - if (CloseTransientFile(fd)) + if (CloseTransientFile(fd) != 0) ereport(ERROR, (errcode_for_file_access(), errmsg("could not close file \"%s\": %m", ControlFilePath))); #else - if (close(fd)) + if (close(fd) != 0) { pg_log_fatal("could not close file \"%s\": %m", ControlFilePath); exit(EXIT_FAILURE); @@ -248,7 +248,7 @@ update_controlfile(const char *DataDir, #endif } - if (close(fd) < 0) + if (close(fd) != 0) { #ifndef FRONTEND ereport(PANIC, |