1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

fix warning "ignoring return value" of fwrite.

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

contributed by Eric Herman.
This commit is contained in:
Jan Lindström
2017-04-05 08:54:20 +03:00
parent 64a37f6cab
commit cd494f4cef

View File

@ -329,9 +329,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