]> granicus.if.org Git - postgresql/commit
Use consistent style for checking return from system calls
authorPeter Eisentraut <peter@eisentraut.org>
Sat, 6 Jul 2019 21:18:46 +0000 (23:18 +0200)
committerPeter Eisentraut <peter@eisentraut.org>
Sun, 7 Jul 2019 13:28:49 +0000 (15:28 +0200)
commit7e9a4c5c3dca0d9637812d8991e96fc8f46800d9
treeea48b3d7e575d88a8e4afeb9040dab178f9a2dab
parentd1a040543b49e0aad273e7766cd7e2fcf2b781fa
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
19 files changed:
contrib/pg_stat_statements/pg_stat_statements.c
src/backend/access/heap/rewriteheap.c
src/backend/access/transam/slru.c
src/backend/access/transam/timeline.c
src/backend/access/transam/twophase.c
src/backend/access/transam/xlog.c
src/backend/libpq/be-fsstubs.c
src/backend/postmaster/postmaster.c
src/backend/replication/logical/origin.c
src/backend/replication/logical/reorderbuffer.c
src/backend/replication/logical/snapbuild.c
src/backend/replication/slot.c
src/backend/replication/walsender.c
src/backend/storage/file/copydir.c
src/backend/storage/file/fd.c
src/backend/storage/ipc/dsm_impl.c
src/backend/utils/cache/relmapper.c
src/common/controldata_utils.c
src/interfaces/libpq/fe-lobj.c