aboutsummaryrefslogtreecommitdiffstats
path: root/src/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/util')
-rw-r--r--src/util/PeakBuffer.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/util/PeakBuffer.cxx b/src/util/PeakBuffer.cxx
index a3659b8f4..d9b193dd1 100644
--- a/src/util/PeakBuffer.cxx
+++ b/src/util/PeakBuffer.cxx
@@ -130,8 +130,9 @@ PeakBuffer::Append(const void *data, size_t length)
return true;
}
- if (peak_buffer == nullptr && peak_size > 0) {
- peak_buffer = (fifo_buffer *)HugeAllocate(peak_size);
+ if (peak_buffer == nullptr) {
+ if (peak_size > 0)
+ peak_buffer = (fifo_buffer *)HugeAllocate(peak_size);
if (peak_buffer == nullptr)
return false;