summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane2009-04-23 17:39:21 +0000
committerTom Lane2009-04-23 17:39:21 +0000
commit63bebf3c50ea2c07281f6bafcdc19a568be4880f (patch)
tree6686877c9bce5d3d7b64773a5e8c3634535578c3
parent88178590f44a3153264f6911eb916dd3fd4c7d7a (diff)
Don't use the result of strcmp as if it were a boolean.
A service of your local coding style police.
-rw-r--r--src/backend/commands/dbcommands.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/commands/dbcommands.c b/src/backend/commands/dbcommands.c
index a401ae4fa1..d300e57160 100644
--- a/src/backend/commands/dbcommands.c
+++ b/src/backend/commands/dbcommands.c
@@ -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.")));