Skip to content

Commit b9e9775

Browse files
committed
Don't use the result of strcmp as if it were a boolean.
A service of your local coding style police.
1 parent 88f4d38 commit b9e9775

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/backend/commands/dbcommands.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*
1414
*
1515
* IDENTIFICATION
16-
* $PostgreSQL: pgsql/src/backend/commands/dbcommands.c,v 1.221 2009/04/15 21:36:12 alvherre Exp $
16+
* $PostgreSQL: pgsql/src/backend/commands/dbcommands.c,v 1.222 2009/04/23 17:39:21 tgl Exp $
1717
*
1818
*-------------------------------------------------------------------------
1919
*/
@@ -387,12 +387,12 @@ createdb(const CreatedbStmt *stmt)
387387
*/
388388
if (strcmp(dbtemplate, "template0") != 0)
389389
{
390-
if (strcmp(dbcollate, src_collate))
390+
if (strcmp(dbcollate, src_collate) != 0)
391391
ereport(ERROR,
392392
(errmsg("new collation is incompatible with the collation of the template database (%s)", src_collate),
393393
errhint("Use the same collation as in the template database, or use template0 as template.")));
394394

395-
if (strcmp(dbctype, src_ctype))
395+
if (strcmp(dbctype, src_ctype) != 0)
396396
ereport(ERROR,
397397
(errmsg("new LC_CTYPE is incompatible with LC_CTYPE of the template database (%s)", src_ctype),
398398
errhint("Use the same LC_CTYPE as in the template database, or use template0 as template.")));

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy