pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix more strcmp() calls using boolean-like comparisons for resul
Date: Fri, 12 Apr 2019 01:28:25 +0000
Message-ID: <E1hEkzR-0001cB-WC@gemulon.postgresql.org> (raw)

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(-)



Message-ID: <E1hEkzR-0001cB-WC@gemulon.postgresql.org>
Permalink:  ../E1hEkzR-0001cB-WC@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1hEkzR-0001cB-WC@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: michael@paquier.xyz
  Subject: Re: pgsql: Fix more strcmp() calls using boolean-like comparisons for resul
  In-Reply-To: <E1hEkzR-0001cB-WC@gemulon.postgresql.org>
  References: <E1hEkzR-0001cB-WC@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox