diff options
Diffstat (limited to 'src/backend/storage/file/fd.c')
-rw-r--r-- | src/backend/storage/file/fd.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/backend/storage/file/fd.c b/src/backend/storage/file/fd.c index 6bfd4fa13ef..7b49802b4e1 100644 --- a/src/backend/storage/file/fd.c +++ b/src/backend/storage/file/fd.c @@ -647,7 +647,7 @@ durable_rename(const char *oldfile, const char *newfile, int elevel) return -1; } - if (CloseTransientFile(fd)) + if (CloseTransientFile(fd) != 0) { ereport(elevel, (errcode_for_file_access(), @@ -1047,7 +1047,7 @@ LruDelete(File file) * Close the file. We aren't expecting this to fail; if it does, better * to leak the FD than to mess up our internal state. */ - if (close(vfdP->fd)) + if (close(vfdP->fd) != 0) elog(vfdP->fdstate & FD_TEMP_FILE_LIMIT ? LOG : data_sync_elevel(LOG), "could not close file \"%s\": %m", vfdP->fileName); vfdP->fd = VFD_CLOSED; @@ -1724,7 +1724,7 @@ FileClose(File file) if (!FileIsNotOpen(file)) { /* close the file */ - if (close(vfdP->fd)) + if (close(vfdP->fd) != 0) { /* * We may need to panic on failure to close non-temporary files; @@ -3302,7 +3302,7 @@ pre_sync_fname(const char *fname, bool isdir, int elevel) */ pg_flush_data(fd, 0, 0); - if (CloseTransientFile(fd)) + if (CloseTransientFile(fd) != 0) ereport(elevel, (errcode_for_file_access(), errmsg("could not close file \"%s\": %m", fname))); @@ -3404,7 +3404,7 @@ fsync_fname_ext(const char *fname, bool isdir, bool ignore_perm, int elevel) return -1; } - if (CloseTransientFile(fd)) + if (CloseTransientFile(fd) != 0) { ereport(elevel, (errcode_for_file_access(), |