Skip to content
Permalink
Browse files
fix warning "ignoring return value" of fwrite.
Merge pull request #343

contributed by Eric Herman.
  • Loading branch information
Jan Lindström committed Apr 5, 2017
1 parent 09b28b3 commit e4a5267
Showing 1 changed file with 5 additions and 1 deletion.
@@ -309,9 +309,13 @@ void wsrep_dump_rbr_buf(THD *thd, const void* rbr_buf, size_t buf_len)
}

FILE *of= fopen(filename, "wb");

if (of)
{
fwrite (rbr_buf, buf_len, 1, of);
if (fwrite(rbr_buf, buf_len, 1, of) == 0)
WSREP_ERROR("Failed to write buffer of length %llu to '%s'",
(unsigned long long)buf_len, filename);

fclose(of);
}
else

0 comments on commit e4a5267

Please sign in to comment.