Commit 6588c657 authored by Ralf Habacker's avatar Ralf Habacker
Browse files

Fix warning 'conversion to ‘long unsigned int’ from ‘WriteResult’ may change...

Fix warning 'conversion to ‘long unsigned int’ from ‘WriteResult’ may change the sign of the result [-Wsign-conversion]'.


Reviewed-by: default avatarSimon McVittie <>
parent 72549f31
......@@ -80,19 +80,22 @@ tool_write_all (int fd,
while (size > bytes_written)
WriteResult this_time = write (fd, p, size - bytes_written);
WriteResult res = write (fd, p, size - bytes_written);
if (this_time < 0)
if (res < 0)
if (errno == EINTR)
return FALSE;
size_t this_time = (size_t) res;
p += this_time;
bytes_written += this_time;
return TRUE;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment