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:
parent
09b28b3d10
commit
e4a52670f4
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user