Skip to content

Commit 43a6cea

Browse files
committed
ext/oci8: use zend_string_equal_content()
1 parent aa574fb commit 43a6cea

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

ext/oci8/oci8.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1096,9 +1096,7 @@ php_oci_connection *php_oci_do_connect_ex(char *username, int username_len, char
10961096
}
10971097

10981098
if ((tmp_val != NULL) && (tmp != NULL) &&
1099-
(ZSTR_LEN(tmp->hash_key) == ZSTR_LEN(hashed_details.s)) &&
1100-
(memcmp(ZSTR_VAL(tmp->hash_key), ZSTR_VAL(hashed_details.s),
1101-
ZSTR_LEN(tmp->hash_key)) == 0)) {
1099+
zend_string_equal_content(tmp->hash_key, hashed_details.s)) {
11021100
connection = tmp;
11031101
GC_ADDREF(connection->id);
11041102
}
@@ -2120,8 +2118,7 @@ static php_oci_spool *php_oci_get_spool(char *username, int username_len, char *
21202118
}
21212119
zend_register_persistent_resource_ex(session_pool->spool_hash_key, session_pool, le_psessionpool);
21222120
} else if (spool_out_le->type == le_psessionpool &&
2123-
ZSTR_LEN(((php_oci_spool *)(spool_out_le->ptr))->spool_hash_key) == ZSTR_LEN(spool_hashed_details.s) &&
2124-
memcmp(ZSTR_VAL(((php_oci_spool *)(spool_out_le->ptr))->spool_hash_key), ZSTR_VAL(spool_hashed_details.s), ZSTR_LEN(spool_hashed_details.s)) == 0) {
2121+
zend_string_equal_content(((php_oci_spool *)(spool_out_le->ptr))->spool_hash_key, spool_hashed_details.s)) {
21252122
/* retrieve the cached session pool */
21262123
session_pool = (php_oci_spool *)(spool_out_le->ptr);
21272124
}

0 commit comments

Comments
 (0)