summaryrefslogtreecommitdiff
path: root/sql/wsrep_binlog.cc
diff options
context:
space:
mode:
authorJan Lindström <jan.lindstrom@mariadb.com>2017-04-05 08:54:20 +0300
committerJan Lindström <jan.lindstrom@mariadb.com>2017-04-05 14:45:17 +0300
commitcd494f4cefb36faa9e4fa343050a30201d4bdebd (patch)
treedf76452266b91b714dd432e5cf26d5dcccabd9fa /sql/wsrep_binlog.cc
parent64a37f6cab054213aeadd9708acc66cbd8f239e7 (diff)
downloadmariadb-git-cd494f4cefb36faa9e4fa343050a30201d4bdebd.tar.gz
fix warning "ignoring return value" of fwrite.
Merge pull request https://github.com/MariaDB/server/pull/343 contributed by Eric Herman.
Diffstat (limited to 'sql/wsrep_binlog.cc')
-rw-r--r--sql/wsrep_binlog.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/sql/wsrep_binlog.cc b/sql/wsrep_binlog.cc
index d3f59cee5f2..b6aee3a74ab 100644
--- a/sql/wsrep_binlog.cc
+++ b/sql/wsrep_binlog.cc
@@ -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