diff options
| author | Robert Haas | 2010-11-15 02:03:48 +0000 |
|---|---|---|
| committer | Robert Haas | 2010-11-15 02:03:48 +0000 |
| commit | 5aa446c961a6fdf15ff9c398751efd6ecff0c64a (patch) | |
| tree | ac22ab29014d718cb234f2edc334c7803b3593a7 /src/interfaces/ecpg | |
| parent | 3892a2d8619ee5623fc3ebee775538fdea1f529e (diff) | |
Cleanup various comparisons with the constant "true".
Itagaki Takahiro, with slight modifications.
Diffstat (limited to 'src/interfaces/ecpg')
| -rw-r--r-- | src/interfaces/ecpg/ecpglib/connect.c | 4 | ||||
| -rw-r--r-- | src/interfaces/ecpg/preproc/ecpg.addons | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/interfaces/ecpg/ecpglib/connect.c b/src/interfaces/ecpg/ecpglib/connect.c index 3bd6614e723..1f918783955 100644 --- a/src/interfaces/ecpg/ecpglib/connect.c +++ b/src/interfaces/ecpg/ecpglib/connect.c @@ -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) { diff --git a/src/interfaces/ecpg/preproc/ecpg.addons b/src/interfaces/ecpg/preproc/ecpg.addons index c39b13c6fb5..3b74ba0a4e4 100644 --- a/src/interfaces/ecpg/preproc/ecpg.addons +++ b/src/interfaces/ecpg/preproc/ecpg.addons @@ -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; |
