summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/bz2/bz2.c6
-rw-r--r--ext/gd/gd_ctx.c6
-rw-r--r--ext/interbase/interbase.c6
-rw-r--r--ext/ldap/ldap.c10
-rw-r--r--ext/odbc/php_odbc.c6
-rw-r--r--ext/xmlrpc/xmlrpc-epi-php.c3
6 files changed, 15 insertions, 22 deletions
diff --git a/ext/bz2/bz2.c b/ext/bz2/bz2.c
index 2d6ffc28ea..c4d7904887 100644
--- a/ext/bz2/bz2.c
+++ b/ext/bz2/bz2.c
@@ -516,13 +516,11 @@ static PHP_FUNCTION(bzcompress)
int error, /* Error Container */
block_size = 4, /* Block size for compression algorithm */
work_factor = 0, /* Work factor for compression algorithm */
- argc; /* Argument count */
+ argc = ZEND_NUM_ARGS(); /* Argument count */
size_t source_len; /* Length of the source data */
unsigned int dest_len; /* Length of the destination buffer */
- argc = ZEND_NUM_ARGS();
-
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|ll", &source, &source_len, &zblock_size, &zwork_factor) == FAILURE) {
+ if (zend_parse_parameters(argc, "s|ll", &source, &source_len, &zblock_size, &zwork_factor) == FAILURE) {
return;
}
diff --git a/ext/gd/gd_ctx.c b/ext/gd/gd_ctx.c
index 9c3d73335c..f00ab4ccb0 100644
--- a/ext/gd/gd_ctx.c
+++ b/ext/gd/gd_ctx.c
@@ -101,12 +101,12 @@ static void _php_image_output_ctx(INTERNAL_FUNCTION_PARAMETERS, int image_type,
*/
switch (image_type) {
case PHP_GDIMG_TYPE_XBM:
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "rp!|ll", &imgind, &file, &file_len, &quality, &basefilter) == FAILURE) {
+ if (zend_parse_parameters(argc, "rp!|ll", &imgind, &file, &file_len, &quality, &basefilter) == FAILURE) {
return;
}
break;
case PHP_GDIMG_TYPE_BMP:
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|z!b", &imgind, &to_zval, &compressed) == FAILURE) {
+ if (zend_parse_parameters(argc, "r|z!b", &imgind, &to_zval, &compressed) == FAILURE) {
return;
}
break;
@@ -117,7 +117,7 @@ static void _php_image_output_ctx(INTERNAL_FUNCTION_PARAMETERS, int image_type,
* PHP_GDIMG_TYPE_WBM
* PHP_GDIMG_TYPE_WEBP
* */
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|z!ll", &imgind, &to_zval, &quality, &basefilter) == FAILURE) {
+ if (zend_parse_parameters(argc, "r|z!ll", &imgind, &to_zval, &quality, &basefilter) == FAILURE) {
return;
}
}
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;
}
diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c
index 244b039385..110c53a0ad 100644
--- a/ext/ldap/ldap.c
+++ b/ext/ldap/ldap.c
@@ -3335,7 +3335,7 @@ PHP_FUNCTION(ldap_parse_result)
char *lmatcheddn, *lerrmsg;
int rc, lerrcode, myargcount = ZEND_NUM_ARGS();
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "rrz/|z/z/z/z/", &link, &result, &errcode, &matcheddn, &errmsg, &referrals, &serverctrls) != SUCCESS) {
+ if (zend_parse_parameters(myargcount, "rrz/|z/z/z/z/", &link, &result, &errcode, &matcheddn, &errmsg, &referrals, &serverctrls) != SUCCESS) {
return;
}
@@ -3411,7 +3411,7 @@ PHP_FUNCTION(ldap_parse_exop)
struct berval *lretdata;
int rc, myargcount = ZEND_NUM_ARGS();
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "rr|z/z/", &link, &result, &retdata, &retoid) != SUCCESS) {
+ if (zend_parse_parameters(myargcount, "rr|z/z/", &link, &result, &retdata, &retoid) != SUCCESS) {
WRONG_PARAM_COUNT;
}
@@ -3925,7 +3925,7 @@ PHP_FUNCTION(ldap_control_paged_result)
LDAPControl ctrl, *ctrlsp[2];
int rc, myargcount = ZEND_NUM_ARGS();
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "rl|bs", &link, &pagesize, &iscritical, &cookie, &cookie_len) != SUCCESS) {
+ if (zend_parse_parameters(myargcount, "rl|bs", &link, &pagesize, &iscritical, &cookie, &cookie_len) != SUCCESS) {
return;
}
@@ -4017,7 +4017,7 @@ PHP_FUNCTION(ldap_control_paged_result_response)
ber_tag_t tag;
int rc, lerrcode, myargcount = ZEND_NUM_ARGS();
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "rr|z/z/", &link, &result, &cookie, &estimated) != SUCCESS) {
+ if (zend_parse_parameters(myargcount, "rr|z/z/", &link, &result, &cookie, &estimated) != SUCCESS) {
return;
}
@@ -4221,7 +4221,7 @@ PHP_FUNCTION(ldap_exop_passwd)
int rc, myargcount = ZEND_NUM_ARGS(), msgid, err;
char* errmsg;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|zzzz/", &link, &user, &oldpw, &newpw, &serverctrls) == FAILURE) {
+ if (zend_parse_parameters(myargcount, "r|zzzz/", &link, &user, &oldpw, &newpw, &serverctrls) == FAILURE) {
WRONG_PARAM_COUNT;
}
diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c
index 0ecdee98e5..941252a5ab 100644
--- a/ext/odbc/php_odbc.c
+++ b/ext/odbc/php_odbc.c
@@ -1302,12 +1302,10 @@ PHP_FUNCTION(odbc_execute)
unsigned char otype;
SQLSMALLINT ctype;
odbc_result *result;
- int numArgs, i, ne;
+ int numArgs = ZEND_NUM_ARGS(), i, ne;
RETCODE rc;
- numArgs = ZEND_NUM_ARGS();
-
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|a", &pv_res, &pv_param_arr) == FAILURE) {
+ if (zend_parse_parameters(numArgs, "r|a", &pv_res, &pv_param_arr) == FAILURE) {
return;
}
diff --git a/ext/xmlrpc/xmlrpc-epi-php.c b/ext/xmlrpc/xmlrpc-epi-php.c
index e1ccd921db..b4dad3860e 100644
--- a/ext/xmlrpc/xmlrpc-epi-php.c
+++ b/ext/xmlrpc/xmlrpc-epi-php.c
@@ -1026,7 +1026,7 @@ PHP_FUNCTION(xmlrpc_server_call_method)
php_output_options out;
int argc = ZEND_NUM_ARGS();
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "rsz|a", &handle, &rawxml, &rawxml_len, &caller_params, &output_opts) != SUCCESS) {
+ if (zend_parse_parameters(argc, "rsz|a", &handle, &rawxml, &rawxml_len, &caller_params, &output_opts) != SUCCESS) {
return;
}
/* user output options */
@@ -1447,4 +1447,3 @@ PHP_FUNCTION(xmlrpc_is_fault)
* c-basic-offset: 4
* End:
*/
-