Skip to content

Commit a573502

Browse files
committed
Give helper function a better name
1 parent 63b8e5d commit a573502

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ext/mysqlnd/mysqlnd_charset.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -769,7 +769,7 @@ PHPAPI const MYSQLND_CHARSET * mysqlnd_find_charset_name(const char * const name
769769
}
770770
/* }}} */
771771

772-
static zend_always_inline bool mysqlnd_validity_prerequisites_check(const MYSQLND_CHARSET * const cset, const zend_uchar *str)
772+
static zend_always_inline bool mysqlnd_mb_validity_prerequisites_check(const MYSQLND_CHARSET * const cset, const zend_uchar *str)
773773
{
774774
/* Encodings that have a minimum length of 1 are compatible with ASCII.
775775
* So we can skip (for performance reasons) the check to mb_valid for them. */
@@ -790,7 +790,7 @@ PHPAPI zend_ulong mysqlnd_cset_escape_quotes(const MYSQLND_CHARSET * const cset,
790790
unsigned int len = 0;
791791
/* check unicode characters */
792792

793-
if (mysqlnd_validity_prerequisites_check(cset, (const zend_uchar *) escapestr) && (len = cset->mb_valid(escapestr, end))) {
793+
if (mysqlnd_mb_validity_prerequisites_check(cset, (const zend_uchar *) escapestr) && (len = cset->mb_valid(escapestr, end))) {
794794
ZEND_ASSERT(newstr + len <= newstr_e);
795795
/* copy mb char without escaping it */
796796
while (len--) {
@@ -830,7 +830,7 @@ PHPAPI zend_ulong mysqlnd_cset_escape_slashes(const MYSQLND_CHARSET * const cset
830830
char esc = '\0';
831831

832832
/* check unicode characters */
833-
if (mysqlnd_validity_prerequisites_check(cset, (const zend_uchar *) escapestr)) {
833+
if (mysqlnd_mb_validity_prerequisites_check(cset, (const zend_uchar *) escapestr)) {
834834
unsigned int len = cset->mb_valid(escapestr, end);
835835
if (len) {
836836
ZEND_ASSERT(newstr + len <= newstr_e);

0 commit comments

Comments
 (0)