Skip to content

Commit 09a1b03

Browse files
committed
ext/pgsql: pgsql.allow_persistent, no need to use such large type for boolean state.
also ext/odbc, simplifying odd comparison with non persistent connections.
1 parent 1fc85a3 commit 09a1b03

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ext/odbc/php_odbc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2219,7 +2219,7 @@ void odbc_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
22192219
}
22202220
}
22212221

2222-
if (ODBCG(allow_persistent) <= 0) {
2222+
if (!ODBCG(allow_persistent)) {
22232223
persistent = 0;
22242224
}
22252225

ext/pgsql/php_pgsql.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ static const php_stream_ops php_stream_pgsql_fd_ops = {
184184
ZEND_BEGIN_MODULE_GLOBALS(pgsql)
185185
zend_long num_links,num_persistent;
186186
zend_long max_links,max_persistent;
187-
zend_long allow_persistent;
187+
bool allow_persistent;
188188
zend_long auto_reset_persistent;
189189
int ignore_notices,log_notices;
190190
zend_object *default_link; /* default link when connection is omitted */

0 commit comments

Comments
 (0)