diff options
author | Andrey Hristov <andrey@php.net> | 2010-10-05 11:08:21 +0000 |
---|---|---|
committer | Andrey Hristov <andrey@php.net> | 2010-10-05 11:08:21 +0000 |
commit | bf7e6f930c11a5aecf12bb916ab1d97463ff0333 (patch) | |
tree | 347ff4a6cddc90323742f26a6b858c69a262246b /ext/mysqlnd/mysqlnd_wireprotocol.c | |
parent | bf6440d00ae9f4d5b8d886450f8032448cc12f2d (diff) | |
download | php-git-bf7e6f930c11a5aecf12bb916ab1d97463ff0333.tar.gz |
add some safe casts
Diffstat (limited to 'ext/mysqlnd/mysqlnd_wireprotocol.c')
-rw-r--r-- | ext/mysqlnd/mysqlnd_wireprotocol.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/mysqlnd/mysqlnd_wireprotocol.c b/ext/mysqlnd/mysqlnd_wireprotocol.c index 992f9cbdf2..b39b0fb034 100644 --- a/ext/mysqlnd/mysqlnd_wireprotocol.c +++ b/ext/mysqlnd/mysqlnd_wireprotocol.c @@ -1392,7 +1392,7 @@ php_mysqlnd_rowp_read_text_protocol(MYSQLND_MEMORY_POOL_CHUNK * row_buffer, zval #else _atoi64((char *) p); #endif - ZVAL_LONG(*current_field, v); + ZVAL_LONG(*current_field, (long) v); /* the cast is safe */ } else { uint64_t v = #ifndef PHP_WIN32 @@ -1414,7 +1414,7 @@ php_mysqlnd_rowp_read_text_protocol(MYSQLND_MEMORY_POOL_CHUNK * row_buffer, zval { ZVAL_STRINGL(*current_field, (char *)p, len, 0); } else { - ZVAL_LONG(*current_field, (int64_t)v); + ZVAL_LONG(*current_field, (long) v); /* the cast is safe */ } } *(p + len) = save; |