pgsql: vacuumdb: Don't assign negative values to a boolean.

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: vacuumdb: Don't assign negative values to a boolean.
Date: 2015-08-15 15:01:15
Message-ID: E1ZQcxP-00058h-3q@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

vacuumdb: Don't assign negative values to a boolean.

Since a17923204736 (vacuumdb: enable parallel mode) -1 has been assigned
to a boolean. That can, justifiedly, trigger compiler warnings. There's
also no need for ternary logic, result was only ever set to 0 or -1. So
don't.

Discussion: 20150812084351(dot)GD8470(at)awork2(dot)anarazel(dot)de
Backpatch: 9.5

Branch
------
master

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

Modified Files
--------------
src/bin/scripts/vacuumdb.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2015-08-15 15:01:16 pgsql: vacuumdb: Don't assign negative values to a boolean.
Previous Message Andres Freund 2015-08-15 14:51:11 pgsql: Don't use 'bool' as a struct member name in help_config.c.