summaryrefslogtreecommitdiff
path: root/ext/interbase
diff options
context:
space:
mode:
authorGabriel Caruso <carusogabriel34@gmail.com>2018-07-22 15:54:00 -0300
committerGabriel Caruso <carusogabriel34@gmail.com>2018-07-22 15:54:00 -0300
commit8ca1f47a7a25f61fcc63313a771e6922e3258046 (patch)
treeb5fc76c7adf6e0cf64d26416161081b0349afd4e /ext/interbase
parent26cd84d19f164f592f24593f4d1d1f7bd10696a6 (diff)
downloadphp-git-8ca1f47a7a25f61fcc63313a771e6922e3258046.tar.gz
Use variables that already received ZEND_NUM_ARGS()
Diffstat (limited to 'ext/interbase')
-rw-r--r--ext/interbase/interbase.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/ext/interbase/interbase.c b/ext/interbase/interbase.c
index 27cbb320b6..478133296b 100644
--- a/ext/interbase/interbase.c
+++ b/ext/interbase/interbase.c
@@ -1123,7 +1123,7 @@ PHP_FUNCTION(ibase_drop_db)
PHP_FUNCTION(ibase_trans)
{
unsigned short i, link_cnt = 0, tpb_len = 0;
- int argn;
+ int argn = ZEND_NUM_ARGS();
char last_tpb[TPB_MAX_SIZE];
ibase_db_link **ib_link = NULL;
ibase_trans *ib_trans;
@@ -1132,8 +1132,6 @@ PHP_FUNCTION(ibase_trans)
RESET_ERRMSG;
- argn = ZEND_NUM_ARGS();
-
/* (1+argn) is an upper bound for the number of links this trans connects to */
ib_link = (ibase_db_link **) safe_emalloc(sizeof(ibase_db_link *),1+argn,0);
@@ -1143,7 +1141,7 @@ PHP_FUNCTION(ibase_trans)
ISC_TEB *teb;
zval *args = NULL;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "+", &args, &argn) == FAILURE) {
+ if (zend_parse_parameters(argn, "+", &args, &argn) == FAILURE) {
efree(ib_link);
RETURN_FALSE;
}