diff options
author | Dmitry Stogov <dmitry@zend.com> | 2014-04-15 15:40:40 +0400 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2014-04-15 15:40:40 +0400 |
commit | 050d7e38ad4163e7fa65e26724d3516ce7b33601 (patch) | |
tree | 2bb49b1b73c37b35fc778e83d9353f0eb9cc12a3 /ext/ldap/ldap.c | |
parent | 93d3a613d82d32dd6f5499e211bfe194d60898b0 (diff) | |
download | php-git-050d7e38ad4163e7fa65e26724d3516ce7b33601.tar.gz |
Cleanup (1-st round)
Diffstat (limited to 'ext/ldap/ldap.c')
-rw-r--r-- | ext/ldap/ldap.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c index e9b9d2e97c..db400ff3a4 100644 --- a/ext/ldap/ldap.c +++ b/ext/ldap/ldap.c @@ -972,13 +972,13 @@ PHP_FUNCTION(ldap_get_entries) array_init(tmp2); add_assoc_long(tmp2, "count", num_values); for (i = 0; i < num_values; i++) { - add_index_stringl(tmp2, i, ldap_value[i]->bv_val, ldap_value[i]->bv_len, 1); + add_index_stringl(tmp2, i, ldap_value[i]->bv_val, ldap_value[i]->bv_len); } ldap_value_free_len(ldap_value); attr_len = strlen(attribute); zend_hash_update(Z_ARRVAL_P(tmp1), php_strtolower(attribute, attr_len), attr_len+1, (void *) &tmp2, sizeof(zval *), NULL); - add_index_string(tmp1, num_attrib, attribute, 1); + add_index_string(tmp1, num_attrib, attribute); num_attrib++; #if (LDAP_API_VERSION > 2000) || HAVE_NSLDAP || HAVE_ORALDAP || WINDOWS @@ -994,7 +994,7 @@ PHP_FUNCTION(ldap_get_entries) add_assoc_long(tmp1, "count", num_attrib); dn = ldap_get_dn(ldap, ldap_result_entry); - add_assoc_string(tmp1, "dn", dn, 1); + add_assoc_string(tmp1, "dn", dn); #if (LDAP_API_VERSION > 2000) || HAVE_NSLDAP || HAVE_ORALDAP || WINDOWS ldap_memfree(dn); #else @@ -1111,12 +1111,12 @@ PHP_FUNCTION(ldap_get_attributes) array_init(tmp); add_assoc_long(tmp, "count", num_values); for (i = 0; i < num_values; i++) { - add_index_stringl(tmp, i, ldap_value[i]->bv_val, ldap_value[i]->bv_len, 1); + add_index_stringl(tmp, i, ldap_value[i]->bv_val, ldap_value[i]->bv_len); } ldap_value_free_len(ldap_value); zend_hash_update(Z_ARRVAL_P(return_value), attribute, strlen(attribute)+1, (void *) &tmp, sizeof(zval *), NULL); - add_index_string(return_value, num_attrib, attribute, 1); + add_index_string(return_value, num_attrib, attribute); num_attrib++; #if (LDAP_API_VERSION > 2000) || HAVE_NSLDAP || HAVE_ORALDAP || WINDOWS @@ -1161,7 +1161,7 @@ PHP_FUNCTION(ldap_get_values_len) array_init(return_value); for (i=0; i<num_values; i++) { - add_next_index_stringl(return_value, ldap_value_len[i]->bv_val, ldap_value_len[i]->bv_len, 1); + add_next_index_stringl(return_value, ldap_value_len[i]->bv_val, ldap_value_len[i]->bv_len); } add_assoc_long(return_value, "count", num_values); @@ -1225,7 +1225,7 @@ PHP_FUNCTION(ldap_explode_dn) add_assoc_long(return_value, "count", count); for (i = 0; i<count; i++) { - add_index_string(return_value, i, ldap_value[i], 1); + add_index_string(return_value, i, ldap_value[i]); } ldap_value_free(ldap_value); @@ -1867,7 +1867,7 @@ PHP_FUNCTION(ldap_parse_result) if (lreferrals != NULL) { refp = lreferrals; while (*refp) { - add_next_index_string(referrals, *refp, 1); + add_next_index_string(referrals, *refp); refp++; } ldap_value_free(lreferrals); @@ -1978,7 +1978,7 @@ PHP_FUNCTION(ldap_parse_reference) if (lreferrals != NULL) { refp = lreferrals; while (*refp) { - add_next_index_string(referrals, *refp, 1); + add_next_index_string(referrals, *refp); refp++; } ldap_value_free(lreferrals); @@ -2345,9 +2345,9 @@ PHP_FUNCTION(ldap_control_paged_result) /* return a PHP control object */ array_init(return_value); - add_assoc_string(return_value, "oid", ctrl.ldctl_oid, 1); + add_assoc_string(return_value, "oid", ctrl.ldctl_oid); if (ctrl.ldctl_value.bv_len) { - add_assoc_stringl(return_value, "value", ctrl.ldctl_value.bv_val, ctrl.ldctl_value.bv_len, 1); + add_assoc_stringl(return_value, "value", ctrl.ldctl_value.bv_val, ctrl.ldctl_value.bv_len); } if (ctrl.ldctl_iscritical) { add_assoc_bool(return_value, "iscritical", ctrl.ldctl_iscritical); |