pgsql: Don't use !! but != 0/NULL to force boolean evaluation. - Mailing list pgsql-committers

From Andres Freund
Subject pgsql: Don't use !! but != 0/NULL to force boolean evaluation.
Date
Msg-id E1akDIC-0000hg-Hv@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Don't use !! but != 0/NULL to force boolean evaluation.

I introduced several uses of !! to force bit arithmetic to be boolean,
but per discussion the project prefers != 0/NULL.

Discussion: CA+TgmoZP5KakLGP6B4vUjgMBUW0woq_dJYi0paOz-My0Hwt_vQ@mail.gmail.com

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/1a7a43672bf2939dda93a27d498349e7a4aa3c14

Modified Files
--------------
contrib/sepgsql/uavc.c                          |  2 +-
src/backend/access/transam/xact.c               |  3 ++-
src/backend/replication/logical/reorderbuffer.c |  2 +-
src/backend/storage/lmgr/lwlock.c               | 12 ++++++------
src/include/access/xact.h                       |  4 ++--
5 files changed, 12 insertions(+), 11 deletions(-)


pgsql-committers by date:

Previous
From: Andres Freund
Date:
Subject: pgsql: Change various Gin*Is* macros to return 0/1.
Next
From: Andres Freund
Date:
Subject: pgsql: pg_rewind: Close backup_label file descriptor.