Browse Source

fix warning "ignoring return value" of fwrite.

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

contributed by Eric Herman.
pull/354/head
Jan Lindström 9 years ago
parent
commit
cd494f4cef
  1. 6
      sql/wsrep_binlog.cc

6
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

Loading…
Cancel
Save