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
main
Mayank Agarwal 12 years ago
parent b1bea58457
commit 48abc06049
  1. 11
      util/posix_logger.h

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

Loading…
Cancel
Save