Fixing cppcheck warnings in mem-heap.c (appeared when valgrind=1) and in jerry-libc.c (appeared libc_raw=1).

This commit is contained in:
Ruben Ayrapetyan
2014-08-04 18:42:40 +04:00
parent 97dc322085
commit ac35a4ebf2
2 changed files with 7 additions and 8 deletions
+1 -2
View File
@@ -351,12 +351,11 @@ __fwrite(const void *ptr, /**< data to write */
size_t nmemb, /**< number of elements */
_FILE *stream) /**< stream pointer */
{
long int ret;
size_t bytes_written = 0;
do
{
ret = syscall_3( __NR_write, (long int)stream, (long int) ((uint8_t*)ptr + bytes_written), (long int) (size * nmemb - bytes_written));
long int ret = syscall_3( __NR_write, (long int)stream, (long int) ((uint8_t*)ptr + bytes_written), (long int) (size * nmemb - bytes_written));
bytes_written += (size_t)ret;
} while (bytes_written != size * nmemb);