diff --git a/util/posix_logger.h b/util/posix_logger.h index ac6615e97435e1d41b7e29b291d6571fd0802497..8f4eef3f2087c0a7c659d8754d0145f782cdf935 100644 --- a/util/posix_logger.h +++ b/util/posix_logger.h @@ -94,12 +94,12 @@ class PosixLogger : public Logger { } assert(p <= limit); + const size_t write_size = p - base; #ifdef OS_LINUX // If this write would cross a boundary of kDebugLogChunkSize // space, pre-allocate more space to avoid overly large // allocations from filesystem allocsize options. - const size_t write_size = p - base; const int last_allocation_chunk = ((kDebugLogChunkSize - 1 + log_size_) / kDebugLogChunkSize); const int desired_allocation_chunk =