aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/dbcommands.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2009-04-23 17:39:21 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2009-04-23 17:39:21 +0000
commitb9e9775e0c7247a82a03abbee8c7441ff0b9ad82 (patch)
treef28ae33e6dd830854bbab5aad9d44ea7cbb2c2c2 /src/backend/commands/dbcommands.c
parent88f4d38d20ff7aec3b2f8e899b3f3d8daede6ae3 (diff)
downloadpostgresql-b9e9775e0c7247a82a03abbee8c7441ff0b9ad82.tar.gz
postgresql-b9e9775e0c7247a82a03abbee8c7441ff0b9ad82.zip
Don't use the result of strcmp as if it were a boolean.
A service of your local coding style police.
Diffstat (limited to 'src/backend/commands/dbcommands.c')
-rw-r--r--src/backend/commands/dbcommands.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/commands/dbcommands.c b/src/backend/commands/dbcommands.c
index fe1c8e2fad9..cb536f3d59f 100644
--- a/src/backend/commands/dbcommands.c
+++ b/src/backend/commands/dbcommands.c
@@ -13,7 +13,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/commands/dbcommands.c,v 1.221 2009/04/15 21:36:12 alvherre Exp $
+ * $PostgreSQL: pgsql/src/backend/commands/dbcommands.c,v 1.222 2009/04/23 17:39:21 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -387,12 +387,12 @@ createdb(const CreatedbStmt *stmt)
*/
if (strcmp(dbtemplate, "template0") != 0)
{
- if (strcmp(dbcollate, src_collate))
+ if (strcmp(dbcollate, src_collate) != 0)
ereport(ERROR,
(errmsg("new collation is incompatible with the collation of the template database (%s)", src_collate),
errhint("Use the same collation as in the template database, or use template0 as template.")));
- if (strcmp(dbctype, src_ctype))
+ if (strcmp(dbctype, src_ctype) != 0)
ereport(ERROR,
(errmsg("new LC_CTYPE is incompatible with LC_CTYPE of the template database (%s)", src_ctype),
errhint("Use the same LC_CTYPE as in the template database, or use template0 as template.")));