Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions ext/mysqlnd/mysqlnd_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ static void _mysqlnd_efree(void *ptr MYSQLND_MEM_D)

#if PHP_DEBUG
{
char * fn = strrchr(__zend_filename, PHP_DIR_SEPARATOR);
const char * fn = strrchr(__zend_filename, PHP_DIR_SEPARATOR);
TRACE_ALLOC_INF_FMT("file=%-15s line=%4d", fn? fn + 1:__zend_filename, __zend_lineno);
}
#endif
Expand Down Expand Up @@ -232,7 +232,7 @@ static void _mysqlnd_pefree(void *ptr, bool persistent MYSQLND_MEM_D)

#if PHP_DEBUG
{
char * fn = strrchr(__zend_filename, PHP_DIR_SEPARATOR);
const char * fn = strrchr(__zend_filename, PHP_DIR_SEPARATOR);
TRACE_ALLOC_INF_FMT("file=%-15s line=%4d", fn? fn + 1:__zend_filename, __zend_lineno);
}
#endif
Expand Down Expand Up @@ -264,7 +264,7 @@ static char * _mysqlnd_pememdup(const char * const ptr, size_t length, bool pers

#if PHP_DEBUG
{
char * fn = strrchr(__zend_filename, PHP_DIR_SEPARATOR);
const char * fn = strrchr(__zend_filename, PHP_DIR_SEPARATOR);
TRACE_ALLOC_INF_FMT("file=%-15s line=%4d", fn? fn + 1:__zend_filename, __zend_lineno);
}
#endif
Expand Down Expand Up @@ -295,7 +295,7 @@ static char * _mysqlnd_pestrndup(const char * const ptr, size_t length, bool per

#if PHP_DEBUG
{
char * fn = strrchr(__zend_filename, PHP_DIR_SEPARATOR);
const char * fn = strrchr(__zend_filename, PHP_DIR_SEPARATOR);
TRACE_ALLOC_INF_FMT("file=%-15s line=%4d", fn? fn + 1:__zend_filename, __zend_lineno);
}
#endif
Expand Down Expand Up @@ -336,7 +336,7 @@ static char * _mysqlnd_pestrdup(const char * const ptr, bool persistent MYSQLND_
TRACE_ALLOC_ENTER(mysqlnd_pestrdup_name);
#if PHP_DEBUG
{
char * fn = strrchr(__zend_filename, PHP_DIR_SEPARATOR);
const char * fn = strrchr(__zend_filename, PHP_DIR_SEPARATOR);
TRACE_ALLOC_INF_FMT("file=%-15s line=%4d", fn? fn + 1:__zend_filename, __zend_lineno);
}
#endif
Expand Down
2 changes: 1 addition & 1 deletion ext/mysqlnd/mysqlnd_connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, get_scheme)(MYSQLND_CONN_DATA * conn, MYSQLND_
/* IPv6 without square brackets so without port */
transport.l = mnd_sprintf(&transport.s, 0, "tcp://[%s]:%u", hostname.s, port);
} else {
char *p;
const char *p;

/* IPv6 addresses are in the format [address]:port */
if (hostname.s[0] == '[') { /* IPv6 */
Expand Down
6 changes: 2 additions & 4 deletions ext/mysqlnd/mysqlnd_result.c
Original file line number Diff line number Diff line change
Expand Up @@ -994,8 +994,7 @@ MYSQLND_METHOD(mysqlnd_res, fetch_into)(MYSQLND_RES * result, const unsigned int
array_init_size(return_value, array_size);

HashTable *row_ht = Z_ARRVAL_P(return_value);
MYSQLND_FIELD *field = meta->fields;
for (unsigned i = 0; i < meta->field_count; i++, field++) {
for (unsigned i = 0; i < meta->field_count; i++) {
zval *data = &row_data[i];

if (flags & MYSQLND_FETCH_NUM) {
Expand Down Expand Up @@ -1038,10 +1037,9 @@ MYSQLND_METHOD(mysqlnd_res, fetch_row_c)(MYSQLND_RES * result)
mysqlnd_result_free_prev_data(result);
if (result->m.fetch_row(result, &row_data, 0, &fetched_anything) == PASS && fetched_anything) {
unsigned field_count = result->field_count;
MYSQLND_FIELD *field = result->meta->fields;

ret = mnd_emalloc(field_count * sizeof(char *));
for (unsigned i = 0; i < field_count; i++, field++) {
for (unsigned i = 0; i < field_count; i++) {
zval *data = &row_data[i];
if (Z_TYPE_P(data) != IS_NULL) {
convert_to_string(data);
Expand Down
2 changes: 1 addition & 1 deletion ext/mysqlnd/mysqlnd_wireprotocol.c
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ php_mysqlnd_greet_read(MYSQLND_CONN_DATA * conn, void * _packet)
packet->auth_protocol = estrdup("");
} else {
/* Check if NUL present */
char *null_terminator = memchr(p, '\0', remaining_size);
const char *null_terminator = memchr(p, '\0', remaining_size);
size_t auth_protocol_len;
if (null_terminator) {
/* If present, do basically estrdup */
Expand Down
3 changes: 1 addition & 2 deletions ext/opcache/zend_persist.c
Original file line number Diff line number Diff line change
Expand Up @@ -525,9 +525,8 @@ static void zend_persist_op_array_ex(zend_op_array *op_array, zend_persistent_sc
zend_op *new_opcodes = zend_shared_memdup_put(op_array->opcodes, sizeof(zend_op) * op_array->last);
zend_op *opline = new_opcodes;
zend_op *end = new_opcodes + op_array->last;
int offset = 0;

for (; opline < end ; opline++, offset++) {
for (; opline < end ; opline++) {
#if ZEND_USE_ABS_CONST_ADDR
if (opline->op1_type == IS_CONST) {
opline->op1.zv = (zval*)((char*)opline->op1.zv + ((char*)op_array->literals - (char*)orig_literals));
Expand Down
Loading