Skip site navigation (1) Skip section navigation (2)

Re: Comparison with "true" in source code

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Comparison with "true" in source code
Date: 2010-11-04 13:16:45
Message-ID: AANLkTikOVza-LtoSRCeJg7-39EJDqA5aMpETGH9z+K1-@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On Wed, Nov 3, 2010 at 6:45 PM, Itagaki Takahiro
<itagaki(dot)takahiro(at)gmail(dot)com> wrote:
> On Wed, Nov 3, 2010 at 2:19 AM, Michael Meskes <meskes(at)postgresql(dot)org> wrote:
>> On Mon, Nov 01, 2010 at 12:17:02PM +0900, Itagaki Takahiro wrote:
>>> There are some "== true" in the codes, but they might not be safe
>>> because all non-zero values are true in C. Is it worth cleaning up them?
>
> Here is a proposed cleanup that replaces "boolean == true" with "boolean".
> I didn't touch "== false" unless they are not in pairs of comparisons
> with true because comparison with false is a valid C code.

It looks like you have one or two irrelevant whitespace changes in ecpg.c.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

pgsql-hackers by date

Next:From: Stephen FrostDate: 2010-11-04 13:35:16
Subject: Re: contrib: auth_delay module
Previous:From: Jan UrbaƄskiDate: 2010-11-04 13:13:34
Subject: Re: contrib: auth_delay module

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group