Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb9e9775

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 parent88f4d38 commitb9e9775

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)

[8]ページ先頭

©2009-2025 Movatter.jp