@@ -420,7 +420,7 @@ static int _php_ldap_control_from_array(LDAP *ld, LDAPControl** ctrl, zval* arra
420420 }
421421 control_value .bv_val = ZSTR_VAL (tmpstring );
422422 control_value .bv_len = ZSTR_LEN (tmpstring );
423- } else if (strcmp ( ZSTR_VAL ( control_oid ) , LDAP_CONTROL_PAGEDRESULTS ) == 0 ) {
423+ } else if (zend_string_equals_literal ( control_oid , LDAP_CONTROL_PAGEDRESULTS )) {
424424 zval * tmp ;
425425 int pagesize = 1 ;
426426 struct berval cookie = { 0L , NULL };
@@ -442,7 +442,7 @@ static int _php_ldap_control_from_array(LDAP *ld, LDAPControl** ctrl, zval* arra
442442 if (rc != LDAP_SUCCESS ) {
443443 php_error_docref (NULL , E_WARNING , "Failed to create paged result control value: %s (%d)" , ldap_err2string (rc ), rc );
444444 }
445- } else if (strcmp ( ZSTR_VAL ( control_oid ) , LDAP_CONTROL_ASSERT ) == 0 ) {
445+ } else if (zend_string_equals_literal ( control_oid , LDAP_CONTROL_ASSERT )) {
446446 zval * tmp ;
447447 zend_string * assert ;
448448 if ((tmp = zend_hash_str_find (Z_ARRVAL_P (val ), "filter" , sizeof ("filter" ) - 1 )) == NULL ) {
@@ -466,7 +466,7 @@ static int _php_ldap_control_from_array(LDAP *ld, LDAPControl** ctrl, zval* arra
466466 }
467467 zend_string_release (assert );
468468 }
469- } else if (strcmp ( ZSTR_VAL ( control_oid ) , LDAP_CONTROL_VALUESRETURNFILTER ) == 0 ) {
469+ } else if (zend_string_equals_literal ( control_oid , LDAP_CONTROL_VALUESRETURNFILTER )) {
470470 zval * tmp ;
471471 if ((tmp = zend_hash_str_find (Z_ARRVAL_P (val ), "filter" , sizeof ("filter" ) - 1 )) == NULL ) {
472472 rc = -1 ;
@@ -490,7 +490,7 @@ static int _php_ldap_control_from_array(LDAP *ld, LDAPControl** ctrl, zval* arra
490490 }
491491 }
492492 }
493- } else if (( strcmp ( ZSTR_VAL ( control_oid ) , LDAP_CONTROL_PRE_READ ) == 0 ) || ( strcmp ( ZSTR_VAL ( control_oid ) , LDAP_CONTROL_POST_READ ) == 0 )) {
493+ } else if (zend_string_equals_literal ( control_oid , LDAP_CONTROL_PRE_READ ) || zend_string_equals_literal ( control_oid , LDAP_CONTROL_POST_READ )) {
494494 zval * tmp ;
495495 if ((tmp = zend_hash_str_find (Z_ARRVAL_P (val ), "attrs" , sizeof ("attrs" ) - 1 )) == NULL ) {
496496 rc = -1 ;
@@ -542,7 +542,7 @@ static int _php_ldap_control_from_array(LDAP *ld, LDAPControl** ctrl, zval* arra
542542 }
543543 }
544544 }
545- } else if (strcmp ( ZSTR_VAL ( control_oid ) , LDAP_CONTROL_SORTREQUEST ) == 0 ) {
545+ } else if (zend_string_equals_literal ( control_oid , LDAP_CONTROL_SORTREQUEST )) {
546546 int num_keys , i ;
547547 zval * sortkey , * tmp ;
548548
@@ -599,7 +599,7 @@ static int _php_ldap_control_from_array(LDAP *ld, LDAPControl** ctrl, zval* arra
599599 if (rc != LDAP_SUCCESS ) {
600600 php_error_docref (NULL , E_WARNING , "Failed to create sort control value: %s (%d)" , ldap_err2string (rc ), rc );
601601 }
602- } else if (strcmp ( ZSTR_VAL ( control_oid ) , LDAP_CONTROL_VLVREQUEST ) == 0 ) {
602+ } else if (zend_string_equals_literal ( control_oid , LDAP_CONTROL_VLVREQUEST )) {
603603 zval * tmp ;
604604 LDAPVLVInfo vlvInfo ;
605605 struct berval attrValue ;
0 commit comments