mirror of
https://github.com/postgres/postgres.git
synced 2025-11-19 13:42:17 +03:00
Cleanup various comparisons with the constant "true".
Itagaki Takahiro, with slight modifications.
This commit is contained in:
@@ -165,7 +165,7 @@ ECPGsetcommit(int lineno, const char *mode, const char *connection_name)
|
||||
|
||||
ecpg_log("ECPGsetcommit on line %d: action \"%s\"; connection \"%s\"\n", lineno, mode, con->name);
|
||||
|
||||
if (con->autocommit == true && strncmp(mode, "off", strlen("off")) == 0)
|
||||
if (con->autocommit && strncmp(mode, "off", strlen("off")) == 0)
|
||||
{
|
||||
if (PQtransactionStatus(con->connection) == PQTRANS_IDLE)
|
||||
{
|
||||
@@ -176,7 +176,7 @@ ECPGsetcommit(int lineno, const char *mode, const char *connection_name)
|
||||
}
|
||||
con->autocommit = false;
|
||||
}
|
||||
else if (con->autocommit == false && strncmp(mode, "on", strlen("on")) == 0)
|
||||
else if (!con->autocommit && strncmp(mode, "on", strlen("on")) == 0)
|
||||
{
|
||||
if (PQtransactionStatus(con->connection) != PQTRANS_IDLE)
|
||||
{
|
||||
|
||||
@@ -353,7 +353,7 @@ ECPG: ClosePortalStmtCLOSEcursor_name block
|
||||
}
|
||||
ECPG: opt_hold block
|
||||
{
|
||||
if (compat == ECPG_COMPAT_INFORMIX_SE && autocommit == true)
|
||||
if (compat == ECPG_COMPAT_INFORMIX_SE && autocommit)
|
||||
$$ = make_str("with hold");
|
||||
else
|
||||
$$ = EMPTY;
|
||||
|
||||
Reference in New Issue
Block a user