diff options
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; |