mirror of
https://github.com/postgres/postgres.git
synced 2025-11-07 19:06:32 +03:00
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
This commit is contained in:
@@ -2520,7 +2520,7 @@ ClosePostmasterPorts(bool am_syslogger)
|
||||
* do this as early as possible, so that if postmaster dies, others won't
|
||||
* think that it's still running because we're holding the pipe open.
|
||||
*/
|
||||
if (close(postmaster_alive_fds[POSTMASTER_FD_OWN]))
|
||||
if (close(postmaster_alive_fds[POSTMASTER_FD_OWN]) != 0)
|
||||
ereport(FATAL,
|
||||
(errcode_for_file_access(),
|
||||
errmsg_internal("could not close postmaster death monitoring pipe in child process: %m")));
|
||||
|
||||
Reference in New Issue
Block a user