pgsql: Fix more strcmp() calls using boolean-like comparisons for resul

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix more strcmp() calls using boolean-like comparisons for resul
Date: 2019-04-12 01:28:25
Message-ID: E1hEkzR-0001cB-WC@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix more strcmp() calls using boolean-like comparisons for result checks

Such calls can confuse the reader as strcmp() uses an integer as result.
The places patched here have been spotted by Thomas Munro, David Rowley
and myself.

Author: Michael Paquier
Reviewed-by: David Rowley
Discussion: https://postgr.es/m/20190411021946.GG2728@paquier.xyz

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/d527fda6216780281b90f48820ae978c61c7905c

Modified Files
--------------
contrib/spi/refint.c | 9 ++++++---
src/backend/commands/lockcmds.c | 3 ++-
src/backend/tsearch/spell.c | 8 ++++----
src/test/modules/test_rls_hooks/test_rls_hooks.c | 8 ++++----
4 files changed, 16 insertions(+), 12 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2019-04-12 01:56:47 pgsql: Switch TAP tests of pg_rewind to use a role with minimal permiss
Previous Message Tom Lane 2019-04-11 22:16:58 pgsql: Re-order some regression test scripts for more parallelism.