ext/ldap: Remove unnecessary scoping

This commit is contained in:
Gina Peter Banyard 2024-09-27 13:36:18 +01:00
parent 647c24fb86
commit 5300f38b75

View file

@ -2533,7 +2533,6 @@ PHP_FUNCTION(ldap_modify_batch)
VERIFY_LDAP_LINK_CONNECTED(ld); VERIFY_LDAP_LINK_CONNECTED(ld);
/* perform validation */ /* perform validation */
{
/* make sure the DN contains no NUL bytes */ /* make sure the DN contains no NUL bytes */
if (zend_char_has_nul_byte(dn, dn_len)) { if (zend_char_has_nul_byte(dn, dn_len)) {
zend_argument_value_error(2, "must not contain null bytes"); zend_argument_value_error(2, "must not contain null bytes");
@ -2638,7 +2637,6 @@ PHP_FUNCTION(ldap_modify_batch)
RETURN_THROWS(); RETURN_THROWS();
} }
} ZEND_HASH_FOREACH_END(); } ZEND_HASH_FOREACH_END();
}
/* validation was successful */ /* validation was successful */
/* allocate array of modifications */ /* allocate array of modifications */
@ -2647,7 +2645,6 @@ PHP_FUNCTION(ldap_modify_batch)
/* for each modification */ /* for each modification */
zend_ulong modification_index = 0; zend_ulong modification_index = 0;
zval *modification_zv = NULL;
ZEND_HASH_FOREACH_NUM_KEY_VAL(modifications, modification_index, modification_zv) { ZEND_HASH_FOREACH_NUM_KEY_VAL(modifications, modification_index, modification_zv) {
ldap_mods[modification_index] = safe_emalloc(1, sizeof(LDAPMod), 0); ldap_mods[modification_index] = safe_emalloc(1, sizeof(LDAPMod), 0);