Commit e4a52670 authored by Jan Lindström's avatar Jan Lindström

fix warning "ignoring return value" of fwrite.

Merge pull request https://github.com/MariaDB/server/pull/343

contributed by Eric Herman.
parent 09b28b3d
...@@ -309,9 +309,13 @@ void wsrep_dump_rbr_buf(THD *thd, const void* rbr_buf, size_t buf_len) ...@@ -309,9 +309,13 @@ void wsrep_dump_rbr_buf(THD *thd, const void* rbr_buf, size_t buf_len)
} }
FILE *of= fopen(filename, "wb"); FILE *of= fopen(filename, "wb");
if (of) 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); fclose(of);
} }
else else
......
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