mirror of
https://github.com/postgres/postgres.git
synced 2025-08-25 20:23:07 +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:
@@ -853,7 +853,7 @@ lo_export(PGconn *conn, Oid lobjId, const char *filename)
|
||||
}
|
||||
|
||||
/* if we already failed, don't overwrite that msg with a close error */
|
||||
if (close(fd) && result >= 0)
|
||||
if (close(fd) != 0 && result >= 0)
|
||||
{
|
||||
printfPQExpBuffer(&conn->errorMessage,
|
||||
libpq_gettext("could not write to file \"%s\": %s\n"),
|
||||
|
Reference in New Issue
Block a user