On Wed, Nov 3, 2010 at 9:45 PM, Itagaki Takahiro
> 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.
> Note that I also changed "boolean != true" in pg_upgrade,
> but I didn't change ones in xlog.c because it might check
> corrupted fields in control files.
>>> ptr2ext = (header_mode == true) ? 'h' : 'c';
>> I actually see no reason why these variables are not defined as bool instead of
>> int, so I changed this. Hopefully I found all of them.
> I added an additional cleanup to 'header_mode' in ecpg; I changed the type
> from bool to char to hold 'h' or 'c'. Do you think it is reasonable?
I looked at this but found that part a bit too clever for its own good.
So committed the rest, plus an additional one-line change to psql's
print.c to avoid making the two accesses to format->wrap_right_pointer
inconsistent with each other.
The Enterprise PostgreSQL Company
In response to
pgsql-hackers by date
|Next:||From: Greg Stark||Date: 2010-11-15 02:16:44|
|Subject: Re: Refactoring the Type System|
|Previous:||From: Robert Haas||Date: 2010-11-15 02:09:22|
|Subject: Re: [COMMITTERS] pgsql: Improved parallel make support|