Skip to content

Commit

Permalink
fix warning "ignoring return value" of fwrite.
Browse files Browse the repository at this point in the history
Merge pull request #343

contributed by Eric Herman.
  • Loading branch information
Jan Lindström committed Apr 5, 2017
1 parent aa820f9 commit ea2695c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sql/wsrep_binlog.cc
Original file line number Diff line number Diff line change
Expand Up @@ -308,9 +308,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
Expand Down

0 comments on commit ea2695c

Please sign in to comment.