Using return value of fwrite in posix_logger.h

Summary: Was causing error(warning) in third-party saying unused result

Test Plan: make

Reviewers: sheki, dhruba

Reviewed By: dhruba

Differential Revision: https://reviews.facebook.net/D9447
This commit is contained in:
Mayank Agarwal 2013-03-14 18:12:22 -07:00
parent b1bea58457
commit 48abc06049

View File

@ -111,11 +111,12 @@ class PosixLogger : public Logger {
} }
#endif #endif
fwrite(base, 1, write_size, file_); size_t sz = fwrite(base, 1, write_size, file_);
assert(sz == write_size);
if (sz > 0) {
fflush(file_); fflush(file_);
log_size_ += write_size; log_size_ += write_size;
}
if (base != buffer) { if (base != buffer) {
delete[] base; delete[] base;
} }