diff options
author | Peter Eisentraut <peter@eisentraut.org> | 2019-07-06 23:18:46 +0200 |
---|---|---|
committer | Peter Eisentraut <peter@eisentraut.org> | 2019-07-07 15:28:49 +0200 |
commit | 7e9a4c5c3dca0d9637812d8991e96fc8f46800d9 (patch) | |
tree | ea48b3d7e575d88a8e4afeb9040dab178f9a2dab /src/backend/storage/ipc/dsm_impl.c | |
parent | d1a040543b49e0aad273e7766cd7e2fcf2b781fa (diff) |
Use consistent style for checking return from system calls
Use
if (something() != 0)
error ...
instead of just
if (something)
error ...
The latter is not incorrect, but it's a bit confusing and not the
common style.
Discussion: https://www.postgresql.org/message-id/flat/5de61b6b-8be9-7771-0048-860328efe027%402ndquadrant.com
Diffstat (limited to 'src/backend/storage/ipc/dsm_impl.c')
-rw-r--r-- | src/backend/storage/ipc/dsm_impl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/storage/ipc/dsm_impl.c b/src/backend/storage/ipc/dsm_impl.c index d32996b6fc4..2879b84bf61 100644 --- a/src/backend/storage/ipc/dsm_impl.c +++ b/src/backend/storage/ipc/dsm_impl.c @@ -917,7 +917,7 @@ dsm_impl_mmap(dsm_op op, dsm_handle handle, Size request_size, *mapped_address = address; *mapped_size = request_size; - if (CloseTransientFile(fd)) + if (CloseTransientFile(fd) != 0) { ereport(elevel, (errcode_for_file_access(), |