Skip to content

Commit cfed58c

Browse files
committed
use marco.
1 parent d73b8b9 commit cfed58c

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

ext/mysqlnd/mysqlnd_wireprotocol.c

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1604,20 +1604,10 @@ php_mysqlnd_rowp_read_text_protocol(MYSQLND_ROW_BUFFER * row_buffer, zval * fiel
16041604
*(p + len) = '\0';
16051605
if (perm_bind.pack_len < SIZEOF_ZEND_LONG) {
16061606
/* direct conversion */
1607-
int64_t v =
1608-
#ifndef PHP_WIN32
1609-
atoll((char *) p);
1610-
#else
1611-
_atoi64((char *) p);
1612-
#endif
1607+
int64_t v = ZEND_ATOL((char *) p);
16131608
ZVAL_LONG(current_field, (zend_long) v); /* the cast is safe */
16141609
} else {
1615-
uint64_t v =
1616-
#ifndef PHP_WIN32
1617-
(uint64_t) strtoull((char *) p, NULL, 10);
1618-
#else
1619-
(uint64_t) _strtoui64((char *) p, NULL, 10);
1620-
#endif
1610+
uint64_t v = ZEND_STRTOUL((char *) p, NULL, 10);
16211611
bool uns = fields_metadata[i].flags & UNSIGNED_FLAG? TRUE:FALSE;
16221612
/* We have to make it ASCIIZ temporarily */
16231613
#if SIZEOF_ZEND_LONG==8

0 commit comments

Comments
 (0)